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/05/09 13:13:58 UTC

[PR] GH-2460: move `org.apache.jena.ontapi.vocabulary` (:jena-ontapi) -> `… [jena]

sszuev opened a new pull request, #2461:
URL: https://github.com/apache/jena/pull/2461

   GitHub issue resolved #2460 
   
   Pull request Description:
   - move `org.apache.jena.ontapi.vocabulary` (:jena-ontapi) -> `org.apache.jena.vocabulary` (:jena-core) 
   - invite OWL1 voc
   - mark OWL voc as deprecated (now `OWL extends OWL1`)
   
   
   ----
   
    - [ ] Tests are included.
    - [ ] Documentation change and updates are provided for the [Apache Jena website](https://github.com/apache/jena-site/)
    - [ ] Commits have been squashed to remove intermediate development commit messages.
    - [ ] 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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615173972


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   Added `src/main/resources/META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle` with content:
   ```
   org.apache.jena.riot.system.InitRIOT
   org.apache.jena.sparql.system.InitARQ
   org.apache.jena.rdfs.sys.InitRDFS
   ```
   
   ![image](https://github.com/apache/jena/assets/17473366/916a2bff-79d1-4368-a96c-112b2b345691)



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1597685533


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL1.java:
##########
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.vocabulary;
+
+import org.apache.jena.rdf.model.Property;
+import org.apache.jena.rdf.model.Resource;
+import org.apache.jena.rdf.model.ResourceFactory;
+
+/**
+ * Vocabulary definitions from file:vocabularies/owl.owl
+ */
+public class OWL1 {
+    // These will use ResourceFactory which creates Resource etc without a specific model.
+    // This is safer for complex initialization paths.
+    protected static Resource resource(String uri) {
+        return ResourceFactory.createResource(NS + uri);
+    }
+
+    protected static Property property(String uri) {
+        return ResourceFactory.createProperty(NS, uri);
+    }
+
+    /**
+     * The namespace of the vocabulary as a string.
+     */
+    public static final String NS = "http://www.w3.org/2002/07/owl#";
+
+    /**
+     * The namespace of the vocabulary as a string
+     */
+    public static String getURI() {
+        return NS;
+    }
+
+    /**
+     * The namespace of the vocabulary as a resource
+     */
+    public static final Resource NAMESPACE = ResourceFactory.createResource(NS);
+
+    /**
+     * A resource that denotes the OWL-full sublanguage of OWL
+     */
+    public static final Resource FULL_LANG = ResourceFactory.createResource(getURI());
+
+    /**
+     * A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL
+     */
+    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL");
+
+    /**
+     * A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL
+     */
+    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite");
+
+    // Vocabulary properties
+    ///////////////////////////
+
+    public static final Property maxCardinality = Init.maxCardinality();
+
+    public static final Property versionInfo = Init.versionInfo();
+
+    public static final Property equivalentClass = Init.equivalentClass();
+
+    public static final Property distinctMembers = Init.distinctMembers();
+
+    public static final Property oneOf = Init.oneOf();
+
+    public static final Property sameAs = Init.sameAs();
+
+    public static final Property incompatibleWith = Init.incompatibleWith();
+
+    public static final Property minCardinality = Init.minCardinality();
+
+    public static final Property complementOf = Init.complementOf();
+
+    public static final Property onProperty = Init.onProperty();
+
+    public static final Property equivalentProperty = Init.equivalentProperty();
+
+    public static final Property inverseOf = Init.inverseOf();
+
+    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
+
+    public static final Property differentFrom = Init.differentFrom();
+
+    public static final Property priorVersion = Init.priorVersion();
+
+    public static final Property imports = Init.imports();
+
+    public static final Property allValuesFrom = Init.allValuesFrom();
+
+    public static final Property unionOf = Init.unionOf();
+
+    public static final Property hasValue = Init.hasValue();
+
+    public static final Property someValuesFrom = Init.someValuesFrom();
+
+    public static final Property disjointWith = Init.disjointWith();
+
+    public static final Property cardinality = Init.cardinality();
+
+    public static final Property intersectionOf = Init.intersectionOf();
+
+    // Vocabulary classes
+    ///////////////////////////
+
+    public static final Resource Thing = Init.Thing();
+
+    public static final Resource DataRange = Init.DataRange();
+
+    public static final Resource Ontology = Init.Ontology();
+
+    public static final Resource DeprecatedClass = Init.DeprecatedClass();
+
+    public static final Resource AllDifferent = Init.AllDifferent();
+
+    public static final Resource DatatypeProperty = Init.DatatypeProperty();
+
+    public static final Resource SymmetricProperty = Init.SymmetricProperty();
+
+    public static final Resource TransitiveProperty = Init.TransitiveProperty();
+
+    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
+
+    public static final Resource AnnotationProperty = Init.AnnotationProperty();
+
+    public static final Resource Restriction = Init.Restriction();
+
+    public static final Resource Class = Init.Class();
+
+    public static final Resource OntologyProperty = Init.OntologyProperty();
+
+    public static final Resource ObjectProperty = Init.ObjectProperty();
+
+    public static final Resource FunctionalProperty = Init.FunctionalProperty();
+
+    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
+
+    public static final Resource Nothing = Init.Nothing();
+
+    // Vocabulary individuals
+    ///////////////////////////
+
+    /**
+     * OWL constants are used during Jena initialization.
+     * <p>
+     * If that initialization is triggered by touching the OWL class,
+     * then the constants are null.
+     * <p>
+     * So for these cases, call this helper class: Init.function()
+     */
+    public static class Init {

Review Comment:
   made a separate commit with fixed OWL1, RDF, XSD vocabularies (after review I will squash commits)



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1614737508


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   With this new initialization I observe error when run particular test through IDE:
   ```
   java.lang.ExceptionInInitializerError
   	at org.apache.jena.riot.RDFParserRegistry.initStandard(RDFParserRegistry.java:74)
   	at org.apache.jena.riot.RDFParserRegistry.init(RDFParserRegistry.java:57)
   	at org.apache.jena.riot.RDFParserRegistry.<clinit>(RDFParserRegistry.java:52)
   	at org.apache.jena.riot.RIOT.init(RIOT.java:83)
   	at org.apache.jena.riot.system.InitRIOT.start(InitRIOT.java:29)
   	at org.apache.jena.base.module.Subsystem.lambda$initialize$1(Subsystem.java:117)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:193)
   	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:169)
   	at org.apache.jena.base.module.Subsystem.initialize(Subsystem.java:115)
   	at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:89)
   	at org.apache.jena.graph.NodeFactory.<clinit>(NodeFactory.java:39)
   	at org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:150)
   	at org.apache.jena.rdf.model.impl.ResourceImpl.<init>(ResourceImpl.java:86)
   	at org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:308)
   	at org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:94)
   	at org.apache.jena.vocabulary.RDF.resource(RDF.java:54)
   	at org.apache.jena.vocabulary.RDF.<clinit>(RDF.java:65)
   	at org.apache.jena.vocabulary.RDF$Nodes.<clinit>(RDF.java:193)
   	at org.apache.jena.ontapi.utils.Graphs.listOntologyNodes(Graphs.java:659)
   	at org.apache.jena.ontapi.utils.Graphs.ontologyNode(Graphs.java:626)
   	at org.apache.jena.ontapi.utils.Graphs.ontologyNode(Graphs.java:613)
   	at org.apache.jena.ontapi.utils.Graphs.findOntologyNameNode(Graphs.java:561)
   	at org.apache.jena.ontapi.utils.Graphs.findOntologyNameNode(Graphs.java:544)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.lambda$baseOntGraphs$2(PersistentGraphRepository.java:64)
   	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
   	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
   	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
   	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
   	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
   	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.collectUnions(PersistentGraphRepository.java:53)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.<init>(PersistentGraphRepository.java:49)
   	at org.apache.jena.ontapi.PersistentGraphRepositoryTest.testSeveralRepositories(PersistentGraphRepositoryTest.java:66)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.jena.rdf.model.Resource.getURI()" because "org.apache.jena.vocabulary.RDF.xmlLiteral" is null
   	at org.apache.jena.riot.lang.ReaderTriX.<clinit>(ReaderTriX.java:119)
   	... 38 more
   ```
   
   It can be fixed by removing `static { JenaSystem.init(); }` in `NodeFactory`:
   
   ![image](https://github.com/apache/jena/assets/17473366/e8e4e622-9a97-437a-89e9-b23660a4ec61)
   
   So should I remove this line or return back that sophisticated initialization? I think the better solution is to remove `JenaSystem.init()`, as it is not required for NodeFactory to be work.



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1597685533


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL1.java:
##########
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.vocabulary;
+
+import org.apache.jena.rdf.model.Property;
+import org.apache.jena.rdf.model.Resource;
+import org.apache.jena.rdf.model.ResourceFactory;
+
+/**
+ * Vocabulary definitions from file:vocabularies/owl.owl
+ */
+public class OWL1 {
+    // These will use ResourceFactory which creates Resource etc without a specific model.
+    // This is safer for complex initialization paths.
+    protected static Resource resource(String uri) {
+        return ResourceFactory.createResource(NS + uri);
+    }
+
+    protected static Property property(String uri) {
+        return ResourceFactory.createProperty(NS, uri);
+    }
+
+    /**
+     * The namespace of the vocabulary as a string.
+     */
+    public static final String NS = "http://www.w3.org/2002/07/owl#";
+
+    /**
+     * The namespace of the vocabulary as a string
+     */
+    public static String getURI() {
+        return NS;
+    }
+
+    /**
+     * The namespace of the vocabulary as a resource
+     */
+    public static final Resource NAMESPACE = ResourceFactory.createResource(NS);
+
+    /**
+     * A resource that denotes the OWL-full sublanguage of OWL
+     */
+    public static final Resource FULL_LANG = ResourceFactory.createResource(getURI());
+
+    /**
+     * A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL
+     */
+    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL");
+
+    /**
+     * A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL
+     */
+    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite");
+
+    // Vocabulary properties
+    ///////////////////////////
+
+    public static final Property maxCardinality = Init.maxCardinality();
+
+    public static final Property versionInfo = Init.versionInfo();
+
+    public static final Property equivalentClass = Init.equivalentClass();
+
+    public static final Property distinctMembers = Init.distinctMembers();
+
+    public static final Property oneOf = Init.oneOf();
+
+    public static final Property sameAs = Init.sameAs();
+
+    public static final Property incompatibleWith = Init.incompatibleWith();
+
+    public static final Property minCardinality = Init.minCardinality();
+
+    public static final Property complementOf = Init.complementOf();
+
+    public static final Property onProperty = Init.onProperty();
+
+    public static final Property equivalentProperty = Init.equivalentProperty();
+
+    public static final Property inverseOf = Init.inverseOf();
+
+    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
+
+    public static final Property differentFrom = Init.differentFrom();
+
+    public static final Property priorVersion = Init.priorVersion();
+
+    public static final Property imports = Init.imports();
+
+    public static final Property allValuesFrom = Init.allValuesFrom();
+
+    public static final Property unionOf = Init.unionOf();
+
+    public static final Property hasValue = Init.hasValue();
+
+    public static final Property someValuesFrom = Init.someValuesFrom();
+
+    public static final Property disjointWith = Init.disjointWith();
+
+    public static final Property cardinality = Init.cardinality();
+
+    public static final Property intersectionOf = Init.intersectionOf();
+
+    // Vocabulary classes
+    ///////////////////////////
+
+    public static final Resource Thing = Init.Thing();
+
+    public static final Resource DataRange = Init.DataRange();
+
+    public static final Resource Ontology = Init.Ontology();
+
+    public static final Resource DeprecatedClass = Init.DeprecatedClass();
+
+    public static final Resource AllDifferent = Init.AllDifferent();
+
+    public static final Resource DatatypeProperty = Init.DatatypeProperty();
+
+    public static final Resource SymmetricProperty = Init.SymmetricProperty();
+
+    public static final Resource TransitiveProperty = Init.TransitiveProperty();
+
+    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
+
+    public static final Resource AnnotationProperty = Init.AnnotationProperty();
+
+    public static final Resource Restriction = Init.Restriction();
+
+    public static final Resource Class = Init.Class();
+
+    public static final Resource OntologyProperty = Init.OntologyProperty();
+
+    public static final Resource ObjectProperty = Init.ObjectProperty();
+
+    public static final Resource FunctionalProperty = Init.FunctionalProperty();
+
+    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
+
+    public static final Resource Nothing = Init.Nothing();
+
+    // Vocabulary individuals
+    ///////////////////////////
+
+    /**
+     * OWL constants are used during Jena initialization.
+     * <p>
+     * If that initialization is triggered by touching the OWL class,
+     * then the constants are null.
+     * <p>
+     * So for these cases, call this helper class: Init.function()
+     */
+    public static class Init {

Review Comment:
   made a separate commit with fixed OWL1, RDF, XSD vocabularies



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615172241


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   PersistentGraphRepositoryTest is here https://github.com/apache/jena/pull/2496 - it is another independent PR
   
   Can you please give me an example of warning. This is strange, since in core and arq there are only renaming (now).



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1613934267


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   This time:
   
   - rename OWL => OWL1
   - make new (alias) OWL extends OWL2
   - no depreciation (so no new warnings should appear)
   - jena-ontapi uses OWL2, jena-core & jena-arq uses OWL1
   - some changes in RDF, XSD
   



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615173972


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   Added `src/main/resources/META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle` with content:
   ```
   org.apache.jena.riot.system.InitRIOT
   org.apache.jena.sparql.system.InitARQ
   org.apache.jena.rdfs.sys.InitRDFS
   ```
   
   ![image](https://github.com/apache/jena/assets/17473366/916a2bff-79d1-4368-a96c-112b2b345691)
   
   Adding `JenaSystem.init();` in additional to service init - resolves the issue.



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615172241


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   PersistentGraphRepositoryTest is here https://github.com/apache/jena/pull/2496 - it is another independent PR
   
   Can you please give me an example of warning. This is strange, since in core and arq there are only renaming.



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1609865786


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   there are 4 constants in OWL1 that are not in OWL2: `NAMESPACE`, `LITE_LANG`, `DL_LANG`, `FULL_LANG`
   we can do like this:
   ```java
   class OWL {
           public static final Resource NAMESPACE = ResourceFactory.createResource(NS);
           public static final Resource OWL1_FULL_LANG = ResourceFactory.createResource(getURI());
           public static final Resource OWL1_DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL");
           public static final Resource OWL1_LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite");
           @Deprecated
           public static final Resource FULL_LANG = OWL1_FULL_LANG;
           @Deprecated
           public static final Resource DL_LANG = OWL1_DL_LANG;
           @Deprecated
           public static final Resource LITE_LANG = OWL1_LITE_LANG;
   ...        
   ```
   And make OWL2 deprecated to avoid confusion.
   in this case we do not need OWL1 vocabulary at all



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1597656296


##########
jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java:
##########
@@ -59,6 +69,14 @@ public static Property li( int i )
     public static final Resource    Statement       = Init.Statement();
     public static final Resource    List            = Init.List();
     public static final Resource    nil             = Init.nil();
+    /**
+     * This property is used explicitly in facet restrictions.
+     * Also, it can be used as a literal type
+     * (e.g., {@code 'test'^^rdf:PlainLiteral}) in old ontologies based on RDF-1.0
+     *
+     * @see <a href="https://www.w3.org/TR/rdf-plain-literal">rdf:PlainLiteral: A Datatype for RDF Plain Literals (Second Edition)</a>
+     */
+    public final static Resource    PlainLiteral    = Init.PlainLiteral();

Review Comment:
   `rdf:PlainLiteral` is used by jena-ontapi (https://github.com/apache/jena/blob/main/jena-ontapi/src/main/java/org/apache/jena/ontapi/common/OntVocabulary.java#L361), since it is present in the specification: https://www.w3.org/TR/owl2-quick-reference/#Built-in_Datatypes ( OWL 2 Web Ontology Language Quick Reference Guide )
   
   
   Also, it is used by OWLAPI (and ONTAPI) https://github.com/owlcs/owlapi/blob/version5/impl/src/main/java/uk/ac/manchester/cs/owl/owlapi/InternalizedEntities.java#L44



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615204923


##########
jena-arq/src/main/java/org/apache/jena/sparql/graph/NodeConst.java:
##########
@@ -58,9 +58,9 @@ private static Node uri(String uriStr) {
     public static final Node nodeANY       = Node.ANY;
 
 
-    public static final Node nodeOwlImports       = OWL.imports.asNode();   // uri("http://www.w3.org/2002/07/owl#imports")
-    public static final Node nodeOwlOntology      = OWL.Ontology.asNode();  // uri("http://www.w3.org/2002/07/owl#Ontology")
-    public static final Node nodeOwlSameAs        = OWL.sameAs.asNode();    // uri("http://www.w3.org/2002/07/owl#sameAs")
+    public static final Node nodeOwlImports       = OWL1.imports.asNode();   // uri("http://www.w3.org/2002/07/owl#imports")
+    public static final Node nodeOwlOntology      = OWL1.Ontology.asNode();  // uri("http://www.w3.org/2002/07/owl#Ontology")
+    public static final Node nodeOwlSameAs        = OWL1.sameAs.asNode();    // uri("http://www.w3.org/2002/07/owl#sameAs")

Review Comment:
   Shouldn't these be `OWL` - they are OWL1/OWL2 neutral.
   This happens quite a lot in this PR.
   If that's the case, then OWL1 where it iued for constants can be converted to OWL as a separate later PR.
   
   



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1614737508


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   With this new initialization I observe error when run particular test through IDE:
   ```
   java.lang.ExceptionInInitializerError
   	at org.apache.jena.riot.RDFParserRegistry.initStandard(RDFParserRegistry.java:74)
   	at org.apache.jena.riot.RDFParserRegistry.init(RDFParserRegistry.java:57)
   	at org.apache.jena.riot.RDFParserRegistry.<clinit>(RDFParserRegistry.java:52)
   	at org.apache.jena.riot.RIOT.init(RIOT.java:83)
   	at org.apache.jena.riot.system.InitRIOT.start(InitRIOT.java:29)
   	at org.apache.jena.base.module.Subsystem.lambda$initialize$1(Subsystem.java:117)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:193)
   	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:169)
   	at org.apache.jena.base.module.Subsystem.initialize(Subsystem.java:115)
   	at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:89)
   	at org.apache.jena.graph.NodeFactory.<clinit>(NodeFactory.java:39)
   	at org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:150)
   	at org.apache.jena.rdf.model.impl.ResourceImpl.<init>(ResourceImpl.java:86)
   	at org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:308)
   	at org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:94)
   	at org.apache.jena.vocabulary.RDF.resource(RDF.java:54)
   	at org.apache.jena.vocabulary.RDF.<clinit>(RDF.java:65)
   	at org.apache.jena.vocabulary.RDF$Nodes.<clinit>(RDF.java:193)
   	at org.apache.jena.ontapi.utils.Graphs.listOntologyNodes(Graphs.java:659)
   	at org.apache.jena.ontapi.utils.Graphs.ontologyNode(Graphs.java:626)
   	at org.apache.jena.ontapi.utils.Graphs.ontologyNode(Graphs.java:613)
   	at org.apache.jena.ontapi.utils.Graphs.findOntologyNameNode(Graphs.java:561)
   	at org.apache.jena.ontapi.utils.Graphs.findOntologyNameNode(Graphs.java:544)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.lambda$baseOntGraphs$2(PersistentGraphRepository.java:64)
   	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
   	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
   	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
   	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
   	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
   	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.collectUnions(PersistentGraphRepository.java:53)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.<init>(PersistentGraphRepository.java:49)
   	at org.apache.jena.ontapi.PersistentGraphRepositoryTest.testSeveralRepositories(PersistentGraphRepositoryTest.java:66)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.jena.rdf.model.Resource.getURI()" because "org.apache.jena.vocabulary.RDF.xmlLiteral" is null
   	at org.apache.jena.riot.lang.ReaderTriX.<clinit>(ReaderTriX.java:119)
   	... 38 more
   ```
   
   It can be fixed by removing `static { JenaSystem.init(); }` in `NodeFactory`:
   
   ![image](https://github.com/apache/jena/assets/17473366/e8e4e622-9a97-437a-89e9-b23660a4ec61)
   
   So should I remove this line or return back that sophisticated initialization? I think the better solution is to remove `JenaSystem.init()`, as it is not required for NodeFactory to work.



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615173972


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   Added `src/main/resources/META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle` with content:
   ```
   org.apache.jena.riot.system.InitRIOT
   org.apache.jena.sparql.system.InitARQ
   org.apache.jena.rdfs.sys.InitRDFS
   ```
   
   ![image](https://github.com/apache/jena/assets/17473366/916a2bff-79d1-4368-a96c-112b2b345691)
   
   Adding `JenaSystem.init();` resolves the issue.



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615184599


##########
jena-ontapi/src/main/resources/META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle:
##########
@@ -0,0 +1,3 @@
+org.apache.jena.riot.system.InitRIOT
+org.apache.jena.sparql.system.InitARQ
+org.apache.jena.rdfs.sys.InitRDFS

Review Comment:
   These should not be here. They are in other ServiceLoader files and wil be run from there. That might be the initialization problem. Putting them here makes them get called twice.
   
   Here, give a class in this module:
   ```
   org.apache.jena.ontapi.sys.InitOntAPI
   ```
   then new package and class:
   
   org.apache.jena.ontapi.sys.InitOntAPI
   
   ```
   public class InitOntAPI implements JenaSubsystemLifecycle {
   
       @Override
       public void start() {
            // Any initialization for this module.  This may be nothing.
       }
   
       @Override
       public void stop() {}
       
       @Override
       public int level() {
           return 15 ;                         -- this is between jena-core and jena-arq RIOT.
       }
   }
   ```
   



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on PR #2461:
URL: https://github.com/apache/jena/pull/2461#issuecomment-2132213550

   > Is this branch ready now?
   
   I think it is ready


-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1597648716


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL1.java:
##########
@@ -0,0 +1,332 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.vocabulary;
+
+import org.apache.jena.rdf.model.Property;
+import org.apache.jena.rdf.model.Resource;
+import org.apache.jena.rdf.model.ResourceFactory;
+
+/**
+ * Vocabulary definitions from file:vocabularies/owl.owl
+ */
+public class OWL1 {
+    // These will use ResourceFactory which creates Resource etc without a specific model.
+    // This is safer for complex initialization paths.
+    protected static Resource resource(String uri) {
+        return ResourceFactory.createResource(NS + uri);
+    }
+
+    protected static Property property(String uri) {
+        return ResourceFactory.createProperty(NS, uri);
+    }
+
+    /**
+     * The namespace of the vocabulary as a string.
+     */
+    public static final String NS = "http://www.w3.org/2002/07/owl#";
+
+    /**
+     * The namespace of the vocabulary as a string
+     */
+    public static String getURI() {
+        return NS;
+    }
+
+    /**
+     * The namespace of the vocabulary as a resource
+     */
+    public static final Resource NAMESPACE = ResourceFactory.createResource(NS);
+
+    /**
+     * A resource that denotes the OWL-full sublanguage of OWL
+     */
+    public static final Resource FULL_LANG = ResourceFactory.createResource(getURI());
+
+    /**
+     * A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL
+     */
+    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL");
+
+    /**
+     * A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL
+     */
+    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite");
+
+    // Vocabulary properties
+    ///////////////////////////
+
+    public static final Property maxCardinality = Init.maxCardinality();
+
+    public static final Property versionInfo = Init.versionInfo();
+
+    public static final Property equivalentClass = Init.equivalentClass();
+
+    public static final Property distinctMembers = Init.distinctMembers();
+
+    public static final Property oneOf = Init.oneOf();
+
+    public static final Property sameAs = Init.sameAs();
+
+    public static final Property incompatibleWith = Init.incompatibleWith();
+
+    public static final Property minCardinality = Init.minCardinality();
+
+    public static final Property complementOf = Init.complementOf();
+
+    public static final Property onProperty = Init.onProperty();
+
+    public static final Property equivalentProperty = Init.equivalentProperty();
+
+    public static final Property inverseOf = Init.inverseOf();
+
+    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
+
+    public static final Property differentFrom = Init.differentFrom();
+
+    public static final Property priorVersion = Init.priorVersion();
+
+    public static final Property imports = Init.imports();
+
+    public static final Property allValuesFrom = Init.allValuesFrom();
+
+    public static final Property unionOf = Init.unionOf();
+
+    public static final Property hasValue = Init.hasValue();
+
+    public static final Property someValuesFrom = Init.someValuesFrom();
+
+    public static final Property disjointWith = Init.disjointWith();
+
+    public static final Property cardinality = Init.cardinality();
+
+    public static final Property intersectionOf = Init.intersectionOf();
+
+    // Vocabulary classes
+    ///////////////////////////
+
+    public static final Resource Thing = Init.Thing();
+
+    public static final Resource DataRange = Init.DataRange();
+
+    public static final Resource Ontology = Init.Ontology();
+
+    public static final Resource DeprecatedClass = Init.DeprecatedClass();
+
+    public static final Resource AllDifferent = Init.AllDifferent();
+
+    public static final Resource DatatypeProperty = Init.DatatypeProperty();
+
+    public static final Resource SymmetricProperty = Init.SymmetricProperty();
+
+    public static final Resource TransitiveProperty = Init.TransitiveProperty();
+
+    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
+
+    public static final Resource AnnotationProperty = Init.AnnotationProperty();
+
+    public static final Resource Restriction = Init.Restriction();
+
+    public static final Resource Class = Init.Class();
+
+    public static final Resource OntologyProperty = Init.OntologyProperty();
+
+    public static final Resource ObjectProperty = Init.ObjectProperty();
+
+    public static final Resource FunctionalProperty = Init.FunctionalProperty();
+
+    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
+
+    public static final Resource Nothing = Init.Nothing();
+
+    // Vocabulary individuals
+    ///////////////////////////
+
+    /**
+     * OWL constants are used during Jena initialization.
+     * <p>
+     * If that initialization is triggered by touching the OWL class,
+     * then the constants are null.
+     * <p>
+     * So for these cases, call this helper class: Init.function()
+     */
+    public static class Init {

Review Comment:
   This pattern (Init inner class) should be unnecessary because initialization is more controlled by `ServiceLoader` and `InitJenaCore`.
   
   I tried making `Init`, class and functions, all `private static` and it didn't seem to cause any problems.
   
   Maybe it would be a good idea to either make this change or at least deprecate all uses of `Init.*` so any user code using them is warned.



##########
jena-core/src/main/java/org/apache/jena/vocabulary/XSD.java:
##########
@@ -178,6 +180,36 @@ public class XSD {
     /** Resource URI for xsd:gMonthDay */
     public static Resource gMonthDay;
 
+    /** Property URI for xsd:length */

Review Comment:
   Is "Property" the right word here? These are constraining facets, which must be an IRI, so maybe Property is forced.



##########
jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java:
##########
@@ -59,6 +69,14 @@ public static Property li( int i )
     public static final Resource    Statement       = Init.Statement();
     public static final Resource    List            = Init.List();
     public static final Resource    nil             = Init.nil();
+    /**
+     * This property is used explicitly in facet restrictions.
+     * Also, it can be used as a literal type
+     * (e.g., {@code 'test'^^rdf:PlainLiteral}) in old ontologies based on RDF-1.0
+     *
+     * @see <a href="https://www.w3.org/TR/rdf-plain-literal">rdf:PlainLiteral: A Datatype for RDF Plain Literals (Second Edition)</a>
+     */
+    public final static Resource    PlainLiteral    = Init.PlainLiteral();

Review Comment:
   rdf:PlainLiteral should never appear in RDF data!
   
   RDF plain literals should not be necessary for RDF 1.1 (all literals have a datatype).
   RDF 1.1 does not have RDF 1.0 "plain literals" (strings + lang tag strings).
   
   Probably worth adding this to the javadoc.
   
   (I would describe it as "archaic" these days.)



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs merged PR #2461:
URL: https://github.com/apache/jena/pull/2461


-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1597656296


##########
jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java:
##########
@@ -59,6 +69,14 @@ public static Property li( int i )
     public static final Resource    Statement       = Init.Statement();
     public static final Resource    List            = Init.List();
     public static final Resource    nil             = Init.nil();
+    /**
+     * This property is used explicitly in facet restrictions.
+     * Also, it can be used as a literal type
+     * (e.g., {@code 'test'^^rdf:PlainLiteral}) in old ontologies based on RDF-1.0
+     *
+     * @see <a href="https://www.w3.org/TR/rdf-plain-literal">rdf:PlainLiteral: A Datatype for RDF Plain Literals (Second Edition)</a>
+     */
+    public final static Resource    PlainLiteral    = Init.PlainLiteral();

Review Comment:
   `rdf:PlainLiteral` is used by jena-ontapi (https://github.com/apache/jena/blob/main/jena-ontapi/src/main/java/org/apache/jena/ontapi/common/OntVocabulary.java#L361), since it is present in the specification: https://www.w3.org/TR/owl2-quick-reference/#Built-in_Datatypes ( OWL 2 Web Ontology Language Quick Reference Guide )



##########
jena-core/src/main/java/org/apache/jena/vocabulary/XSD.java:
##########
@@ -178,6 +180,36 @@ public class XSD {
     /** Resource URI for xsd:gMonthDay */
     public static Resource gMonthDay;
 
+    /** Property URI for xsd:length */

Review Comment:
   I meant `org.apache.jena.rdf.model.Property`, it is used as a predicate in facet restrictions



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1609770268


##########
jena-core/src/main/java/org/apache/jena/vocabulary/RDF.java:
##########
@@ -62,79 +62,85 @@ public static Property li(int i) {
         return property("_" + i);
     }
 
-    public static final Resource    Alt             = Init.Alt();
-    public static final Resource    Bag             = Init.Bag();
-    public static final Resource    Property        = Init._Property();
-    public static final Resource    Seq             = Init.Seq();
-    public static final Resource    Statement       = Init.Statement();
-    public static final Resource    List            = Init.List();
-    public static final Resource    nil             = Init.nil();
+    public static final Resource    Alt             = resource("Alt");
+    public static final Resource    Bag             = resource("Bag");
+    public static final Resource    Property        = resource("Property");
+    public static final Resource    Seq             = resource("Seq");
+    public static final Resource    Statement       = resource("Statement");
+    public static final Resource    List            = resource("List");
+    public static final Resource    nil             = resource("nil");
+
+    // RDF 1.1 - the datatypes of language strings
+    public static final Resource    langString      = resource("langString");
+
+    // RDF 1.1 - rdf:HTML
+    public static final Resource    HTML            = resource("HTML");
+
+    // rdf:XMLLiteral
+    public static final Resource    xmlLiteral      = resource("XMLLiteral");
+
+    // rdf:dirLangString
+    public static final Resource    dirLangString   = resource("dirLangString");
+
+    // rdf:JSON
+    public static final Resource    JSON            = resource("JSON");
+
+    // rdfs:comment "A class representing a compound literal."
+    public static final Resource CompoundLiteral    = resource("CompoundLiteral");
     /**
      * This property is used explicitly in facet restrictions.
      * Also, it can be used as a literal type
      * (e.g., {@code 'test'^^rdf:PlainLiteral}) in old ontologies based on RDF-1.0
      *
      * @see <a href="https://www.w3.org/TR/rdf-plain-literal">rdf:PlainLiteral: A Datatype for RDF Plain Literals (Second Edition)</a>
      */
-    public final static Resource    PlainLiteral    = Init.PlainLiteral();
-
-    public static final Property    first           = Init.first();
-    public static final Property    rest            = Init.rest();
-    public static final Property    subject         = Init.subject();
-    public static final Property    predicate       = Init.predicate();
-    public static final Property    object          = Init.object();
-    public static final Property    type            = Init.type();
-    public static final Property    value           = Init.value();
+    public final static Resource    PlainLiteral    = resource("PlainLiteral");
+
+    public static final Property    first           = property("first");
+    public static final Property    rest            = property("rest");
+    public static final Property    subject         = property("subject");
+    public static final Property    predicate       = property("predicate");
+    public static final Property    object          = property("object");
+    public static final Property    type            = property("type");
+    public static final Property    value           = property("value");
     /**
      * This property is used in facet restrictions.
      * The facet {@code rdf:langRange} can be used to refer to a subset of strings containing the language tag.
      *
      * @see <a href="https://www.w3.org/TR/rdf-plain-literal/#langRange">rdf:langRange</a>
      */
-    public static final Property    langRange       = Init.langRange();
-
-    // RDF 1.1 - the datatypes of language strings
-    public static final Resource    langString      = Init.langString();
-
-    // RDF 1.1 - rdf:HTML
-    public static final Resource    HTML            = Init.HTML();
-
-    // rdf:XMLLiteral
-    public static final Resource    xmlLiteral      = Init.xmlLiteral();
-
-    public static final RDFDatatype dtRDFHTML       = Init.dtRDFHTML();
-    public static final RDFDatatype dtLangString    = Init.dtLangString();
-    public static final RDFDatatype dtDirLangString = Init.dtDirLangString();
-    public static final RDFDatatype dtXMLLiteral    = Init.dtXMLLiteral();
-
-    // Added to the RDF namespace December 2019
-    // https://lists.w3.org/Archives/Public/semantic-web/2019Dec/0027.html
-
-    // rdfs:comment "The datatype of RDF literals storing JSON content."
-    public static final RDFDatatype dtRDFJSON       = Init.dtRDFJSON();
-    public static final Resource    JSON            = Init.JSON();
-
-    // rdfs:comment "A class representing a compound literal."
-    public static final Resource CompoundLiteral    = Init.CompoundLiteral();
+    public static final Property    langRange       = property("langRange");
 
     // rdfs:comment "The language component of a CompoundLiteral."
-    public static final Property language           = Init.language();
+    public static final Property    language        = property("language");
 
     // rdfs:comment "The base direction component of a CompoundLiteral."
-    public static final Property direction          = Init.direction();
+    public static final Property    direction       = property("direction");
 
     // The constant "ltr" (left to right)
     public static final String dirLTR               = TextDirection.LTR.direction();
     // The constant "rtl" (right to left)
     public static final String dirRTL               = TextDirection.RTL.direction();
 
+    public static final RDFDatatype dtRDFHTML       = RDFhtml.rdfHTML;
+    public static final RDFDatatype dtLangString    = RDFLangString.rdfLangString;
+    public static final RDFDatatype dtDirLangString = RDFDirLangString.rdfDirLangString;
+    public static final RDFDatatype dtXMLLiteral    = XMLLiteralType.theXMLLiteralType;
+
+    // Added to the RDF namespace December 2019
+    // https://lists.w3.org/Archives/Public/semantic-web/2019Dec/0027.html
+
+    // rdfs:comment "The datatype of RDF literals storing JSON content."
+    public static final RDFDatatype dtRDFJSON       = RDFjson.rdfJSON;
+
     /** RDF constants are used during Jena initialization.
      * <p>
      * If that initialization is triggered by touching the RDF class,
      * then the constants are null.
      * <p>
      * So for these cases, call this helper class: Init.function()
      */
+    @Deprecated

Review Comment:
   👍🏻 



##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   This cases 424 warnings on the Jena code base!
   
   200 are in jena-core:src/main/java:org.apache.jena.ontology 
   50 are in  jena-core:src/main/java:org.apache.jena.reasoner
   
   155 are in jena-core tests
   
   Shouldn't these all be OWL1?
   
   As vocabularies, is there anything OWL2 that conflicts with OWL1?
   
   Would it work if we change all uses in Jena to be OWL1 where it must be OWL1 (legacy ontology, reasoner) then have `public class OWL extends OWL2`?



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on PR #2461:
URL: https://github.com/apache/jena/pull/2461#issuecomment-2132211207

   If you have no preference a to PR order, let's get them in 2461 then 2496 (including any changes to the code in 2461 that 2496 shows are needed.
   
   Is this branch ready now?
   


-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615204923


##########
jena-arq/src/main/java/org/apache/jena/sparql/graph/NodeConst.java:
##########
@@ -58,9 +58,9 @@ private static Node uri(String uriStr) {
     public static final Node nodeANY       = Node.ANY;
 
 
-    public static final Node nodeOwlImports       = OWL.imports.asNode();   // uri("http://www.w3.org/2002/07/owl#imports")
-    public static final Node nodeOwlOntology      = OWL.Ontology.asNode();  // uri("http://www.w3.org/2002/07/owl#Ontology")
-    public static final Node nodeOwlSameAs        = OWL.sameAs.asNode();    // uri("http://www.w3.org/2002/07/owl#sameAs")
+    public static final Node nodeOwlImports       = OWL1.imports.asNode();   // uri("http://www.w3.org/2002/07/owl#imports")
+    public static final Node nodeOwlOntology      = OWL1.Ontology.asNode();  // uri("http://www.w3.org/2002/07/owl#Ontology")
+    public static final Node nodeOwlSameAs        = OWL1.sameAs.asNode();    // uri("http://www.w3.org/2002/07/owl#sameAs")

Review Comment:
   Shouldn't these be `OWL` - they are OWL1/OWL2 neutral.
   This happens quite a lot in this PR.
   If that's the case, then OWL1 where it iued for constants can be converted to OWL as a separate later PR.
   
   Otherwise, it looks good to go. I mainly checked the code outside jena-ontapi.
   
   



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1614737508


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   With this new initialization I observe error when run particular test through IDE:
   ```
   java.lang.ExceptionInInitializerError
   	at org.apache.jena.riot.RDFParserRegistry.initStandard(RDFParserRegistry.java:74)
   	at org.apache.jena.riot.RDFParserRegistry.init(RDFParserRegistry.java:57)
   	at org.apache.jena.riot.RDFParserRegistry.<clinit>(RDFParserRegistry.java:52)
   	at org.apache.jena.riot.RIOT.init(RIOT.java:83)
   	at org.apache.jena.riot.system.InitRIOT.start(InitRIOT.java:29)
   	at org.apache.jena.base.module.Subsystem.lambda$initialize$1(Subsystem.java:117)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:193)
   	at org.apache.jena.base.module.Subsystem.forEach(Subsystem.java:169)
   	at org.apache.jena.base.module.Subsystem.initialize(Subsystem.java:115)
   	at org.apache.jena.sys.JenaSystem.init(JenaSystem.java:89)
   	at org.apache.jena.graph.NodeFactory.<clinit>(NodeFactory.java:39)
   	at org.apache.jena.rdf.model.impl.ResourceImpl.fresh(ResourceImpl.java:150)
   	at org.apache.jena.rdf.model.impl.ResourceImpl.<init>(ResourceImpl.java:86)
   	at org.apache.jena.rdf.model.ResourceFactory$Impl.createResource(ResourceFactory.java:308)
   	at org.apache.jena.rdf.model.ResourceFactory.createResource(ResourceFactory.java:94)
   	at org.apache.jena.vocabulary.RDF.resource(RDF.java:54)
   	at org.apache.jena.vocabulary.RDF.<clinit>(RDF.java:65)
   	at org.apache.jena.vocabulary.RDF$Nodes.<clinit>(RDF.java:193)
   	at org.apache.jena.ontapi.utils.Graphs.listOntologyNodes(Graphs.java:659)
   	at org.apache.jena.ontapi.utils.Graphs.ontologyNode(Graphs.java:626)
   	at org.apache.jena.ontapi.utils.Graphs.ontologyNode(Graphs.java:613)
   	at org.apache.jena.ontapi.utils.Graphs.findOntologyNameNode(Graphs.java:561)
   	at org.apache.jena.ontapi.utils.Graphs.findOntologyNameNode(Graphs.java:544)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.lambda$baseOntGraphs$2(PersistentGraphRepository.java:64)
   	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
   	at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
   	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
   	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
   	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
   	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
   	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.collectUnions(PersistentGraphRepository.java:53)
   	at org.apache.jena.ontapi.impl.repositories.PersistentGraphRepository.<init>(PersistentGraphRepository.java:49)
   	at org.apache.jena.ontapi.PersistentGraphRepositoryTest.testSeveralRepositories(PersistentGraphRepositoryTest.java:66)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
   Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.jena.rdf.model.Resource.getURI()" because "org.apache.jena.vocabulary.RDF.xmlLiteral" is null
   	at org.apache.jena.riot.lang.ReaderTriX.<clinit>(ReaderTriX.java:119)
   	... 38 more
   ```
   
   It can be fixed by removing `static { JenaSystem.init(); }` in `NodeFactory`:
   ![image](https://github.com/apache/jena/assets/17473366/e8e4e622-9a97-437a-89e9-b23660a4ec61)
   
   So should I remove this line or return back that sophisticated initialization?



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "sszuev (via GitHub)" <gi...@apache.org>.
sszuev commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1613934267


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   This time:
   
   - rename OWL => OWL1
   - make new (alias) OWL extends OWL2
   - no depreciation (so no new warnings should appear)
   - jena-ontapi uses OWL2, jena-core & jena-arq uses OWL1
   - change initialization of RDF, XSD, OWL, add some new constants (see above)
   



-- 
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-2460: move vocabularies :jena-ontapi -> :jena-core, add OWL1, mark OWL as deprecated [jena]

Posted by "afs (via GitHub)" <gi...@apache.org>.
afs commented on code in PR #2461:
URL: https://github.com/apache/jena/pull/2461#discussion_r1615171270


##########
jena-core/src/main/java/org/apache/jena/vocabulary/OWL.java:
##########
@@ -20,178 +20,11 @@
 ///////////////////////////////////////
 package org.apache.jena.vocabulary;
 
-// Imports
-///////////////////////////////////////
-import org.apache.jena.rdf.model.* ;
-
 /**
  * Vocabulary definitions from file:vocabularies/owl.owl
+ *
+ * @deprecated use {@link OWL1} or {@link OWL2}
  */
-public class OWL {
-    // These will use ResourceFactory which creates Resource etc without a specific model.
-    // This is safer for complex initialization paths.
-    protected static final Resource resource( String uri )
-    { return ResourceFactory.createResource( NS+uri ); }
-
-    protected static final Property property( String uri )
-    { return ResourceFactory.createProperty( NS, uri ); }
-
-    /** The namespace of the vocabulary as a string. */
-    public static final String NS = "http://www.w3.org/2002/07/owl#";
-    
-    /** The namespace of the vocabulary as a string */
-    public static String getURI() {return NS;}
-    
-    /** The namespace of the vocabulary as a resource */
-    public static final Resource NAMESPACE = ResourceFactory.createResource( NS );
-    
-    /** A resource that denotes the OWL-full sublanguage of OWL */
-    public static final Resource FULL_LANG = ResourceFactory.createResource( getURI() );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-DL sublanguage of OWL */
-    public static final Resource DL_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLDL" );
-    
-    /** A resource, not officially sanctioned by WebOnt, that denotes the OWL-Lite sublanguage of OWL */
-    public static final Resource LITE_LANG = ResourceFactory.createResource("http://www.w3.org/TR/owl-features/#term_OWLLite" );
-
-    // Vocabulary properties
-    ///////////////////////////
-
-    public static final Property maxCardinality = Init.maxCardinality();
-    
-    public static final Property versionInfo = Init.versionInfo();
-    
-    public static final Property equivalentClass = Init.equivalentClass();
-    
-    public static final Property distinctMembers = Init.distinctMembers();
-    
-    public static final Property oneOf = Init.oneOf();
-    
-    public static final Property sameAs = Init.sameAs();
-    
-    public static final Property incompatibleWith = Init.incompatibleWith();
-    
-    public static final Property minCardinality = Init.minCardinality();
-    
-    public static final Property complementOf = Init.complementOf();
-    
-    public static final Property onProperty = Init.onProperty();
-    
-    public static final Property equivalentProperty = Init.equivalentProperty();
-    
-    public static final Property inverseOf = Init.inverseOf();
-    
-    public static final Property backwardCompatibleWith = Init.backwardCompatibleWith();
-    
-    public static final Property differentFrom = Init.differentFrom();
-    
-    public static final Property priorVersion = Init.priorVersion();
-    
-    public static final Property imports = Init.imports();
-    
-    public static final Property allValuesFrom = Init.allValuesFrom();
-    
-    public static final Property unionOf = Init.unionOf();
-    
-    public static final Property hasValue = Init.hasValue();
-    
-    public static final Property someValuesFrom = Init.someValuesFrom();
-    
-    public static final Property disjointWith = Init.disjointWith();
-    
-    public static final Property cardinality = Init.cardinality();
-    
-    public static final Property intersectionOf = Init.intersectionOf();
-
-    // Vocabulary classes
-    ///////////////////////////
-
-    public static final Resource Thing = Init.Thing();
-    
-    public static final Resource DataRange = Init.DataRange();
-    
-    public static final Resource Ontology = Init.Ontology();
-    
-    public static final Resource DeprecatedClass = Init.DeprecatedClass();
-    
-    public static final Resource AllDifferent = Init.AllDifferent();
-    
-    public static final Resource DatatypeProperty = Init.DatatypeProperty();
-    
-    public static final Resource SymmetricProperty = Init.SymmetricProperty();
-    
-    public static final Resource TransitiveProperty = Init.TransitiveProperty();
-    
-    public static final Resource DeprecatedProperty = Init.DeprecatedProperty();
-    
-    public static final Resource AnnotationProperty = Init.AnnotationProperty();
-    
-    public static final Resource Restriction = Init.Restriction();
-    
-    public static final Resource Class = Init.Class();
-    
-    public static final Resource OntologyProperty = Init.OntologyProperty();
-    
-    public static final Resource ObjectProperty = Init.ObjectProperty();
-    
-    public static final Resource FunctionalProperty = Init.FunctionalProperty();
-    
-    public static final Resource InverseFunctionalProperty = Init.InverseFunctionalProperty();
-    
-    public static final Resource Nothing = Init.Nothing();
-    
-    // Vocabulary individuals
-    ///////////////////////////
-    
-    /** OWL constants are used during Jena initialization.
-     * <p>
-     * If that initialization is triggered by touching the OWL class,
-     * then the constants are null.
-     * <p>
-     * So for these cases, call this helper class: Init.function()   
-     */
-    public static class Init {
-        // JENA-1294
-        // Version that calculate the constant when called. 
-        public static Property maxCardinality()             { return property( "maxCardinality" ); }
-        public static Property versionInfo()                { return property( "versionInfo" ); }
-        public static Property equivalentClass()            { return property( "equivalentClass" ); }
-        public static Property distinctMembers()            { return property( "distinctMembers" ); }
-        public static Property oneOf()                      { return property( "oneOf" ); }
-        public static Property sameAs()                     { return property( "sameAs" ); }
-        public static Property incompatibleWith()           { return property( "incompatibleWith" ); }
-        public static Property minCardinality()             { return property( "minCardinality" ); }
-        public static Property complementOf()               { return property( "complementOf" ); }
-        public static Property onProperty()                 { return property( "onProperty" ); }
-        public static Property equivalentProperty()         { return property( "equivalentProperty" ); }
-        public static Property inverseOf()                  { return property( "inverseOf" ); }
-        public static Property backwardCompatibleWith()     { return property( "backwardCompatibleWith" ); }
-        public static Property differentFrom()              { return property( "differentFrom" ); }
-        public static Property priorVersion()               { return property( "priorVersion" ); }
-        public static Property imports()                    { return property( "imports" ); }
-        public static Property allValuesFrom()              { return property( "allValuesFrom" ); }
-        public static Property unionOf()                    { return property( "unionOf" ); }
-        public static Property hasValue()                   { return property( "hasValue" ); }
-        public static Property someValuesFrom()             { return property( "someValuesFrom" ); }
-        public static Property disjointWith()               { return property( "disjointWith" ); }
-        public static Property cardinality()                { return property( "cardinality" ); }
-        public static Property intersectionOf()             { return property( "intersectionOf" ); }
-        public static Resource Thing()                      { return resource( "Thing" ); }
-        public static Resource DataRange()                  { return resource( "DataRange" ); }
-        public static Resource Ontology()                   { return resource( "Ontology" ); }
-        public static Resource DeprecatedClass()            { return resource( "DeprecatedClass" ); }
-        public static Resource AllDifferent()               { return resource( "AllDifferent" ); }
-        public static Resource DatatypeProperty()           { return resource( "DatatypeProperty" ); }
-        public static Resource SymmetricProperty()          { return resource( "SymmetricProperty" ); }
-        public static Resource TransitiveProperty()         { return resource( "TransitiveProperty" ); }
-        public static Resource DeprecatedProperty()         { return resource( "DeprecatedProperty" ); }
-        public static Resource AnnotationProperty()         { return resource( "AnnotationProperty" ); }
-        public static Resource Restriction()                { return resource( "Restriction" ); }
-        public static Resource Class()                      { return resource( "Class" ); }
-        public static Resource OntologyProperty()           { return resource( "OntologyProperty" ); }
-        public static Resource ObjectProperty()             { return resource( "ObjectProperty" ); }
-        public static Resource FunctionalProperty()         { return resource( "FunctionalProperty" ); }
-        public static Resource InverseFunctionalProperty()  { return resource( "InverseFunctionalProperty" ); }
-        public static Resource Nothing()                    { return resource( "Nothing" ); }
-    }
+@Deprecated
+public class OWL extends OWL1 {

Review Comment:
   I don't see `PersistentGraphRepositoryTest` in the PR code base - I have this pulled PR as of commit 648852b. The warnings count looks the same as before. 
   
   1/
   The situation in the stacktrace usually means the code is already inside `JenaSystem.init`.
   
   There is call to `JenaSystem.init` here because code may use `NodeFactory` as a first call into Jena.
   tests suite can sometimes need their own `JenaSystem.init` because they do tend to go straight the non-public code they are testing.
   
   `PersistentGraphRepository` looks like a entry point (a place where a first call happens) - maybe it needs `static { `JenaSystem.init(): }`
   
   Calling `JenaSystem.init` should always be safe. I can't see from at the stacktrace how the code got to `org.apache.jena.riot.lang.ReaderTriX.<clinit>(ReaderTriX.java:119)`.
   
   `PersistentGraphRepositoryTest` may need a call to `JenaSystem.init`. If that does not help, then, yes, this may need to go back to the old way of initializing. which was for this this case but IIRC before ServiceLoader came along.
   
   2/
   This isn't the cause  - it may help generally.
   
   jena-ontapi does not have a `src/main/resources/META-INF/services/org.apache.jena.sys.JenaSubsystemLifecycle` file. 
   
   See `jena-core` for an example. Having one of these, controls the initlialization order in Jena so it can go after jena-core before jena-arq at level 15 (see `JenaSystem` for details).
   
   
   
   
   



-- 
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