[jira] [Comment Edited] (JENA-1729) A minor initilization issue

2019-07-09 Thread ssz (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16880243#comment-16880243
 ] 

ssz edited comment on JENA-1729 at 7/9/19 11:13 AM:


In my case (the project avicomp/ont-map) I use Jena initialization subsystem to 
load library graphs from system resources in order to have them as some kind of 
singleton: they are used widely in API, which is desired to be fast as 
possible. Maybe yes, loading graphs while initialization is not very good idea, 
and I have to think to change it somehow. But for me this is a minor issue, and 
here is mostly for the record; the appropriate way to use the api implies 
explicit calling `JenaSystem.init()`


was (Author: szz):
In my case (the project [avicomp/ont-map|https://github.com/avicomp/ont-map]) I 
use Jena initialization subsystem to load library graphs from system resources 
in order to have them as some kind of singleton: they are used widely in API, 
which is desired to be fast as possible. Maybe yes, loading graphs while 
initialization is not very good idea, and I have to think to change it somehow. 
But for me this is a minor issue, and here is mostly for the record; the 
appropriate way to use the api implies explicit calling `JenaSystem.init()`

> A minor initilization issue
> ---
>
> Key: JENA-1729
> URL: https://issues.apache.org/jira/browse/JENA-1729
> Project: Apache Jena
>  Issue Type: Bug
>  Components: Core
> Environment: java8(1.8.0_152), jena-arq:3.12.0
>Reporter: ssz
>Priority: Minor
> Fix For: Jena 3.12.0
>
>
> The following one-class program fails with assertion error:
>  
> {code:java}
> package xx.yy;
> import org.apache.jena.rdf.model.RDFNode;
> import org.apache.jena.rdf.model.ResourceFactory;
> import org.apache.jena.sys.JenaSubsystemLifecycle;
> import org.apache.jena.sys.JenaSystem;
> import org.apache.jena.vocabulary.RDF;
> public class InitTest implements JenaSubsystemLifecycle {
> @Override
> public void start() {
> if (JenaSystem.DEBUG_INIT)
> System.err.println("InitTEST -- start");
> assert RDF.type != null : "RDF#type is null => attempt to load a 
> graph here will fail";
> }
> @Override
> public void stop() {
> if (JenaSystem.DEBUG_INIT)
> System.err.println("InitTEST -- finish");
> }
> @Override
> public int level() {
> return 500;
> }
> public static void main(String... args) { // run VM option: -ea
> JenaSystem.DEBUG_INIT = true;
> //RDFNode r = ResourceFactory.createProperty("X"); // this works fine
> RDFNode r = ResourceFactory.createTypedLiteral("Y"); // this causes a 
> problem
> System.out.println(r);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (JENA-1729) A minor initilization issue

2019-07-09 Thread ssz (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16880243#comment-16880243
 ] 

ssz edited comment on JENA-1729 at 7/9/19 11:12 AM:


In my case (the project [avicomp/ont-map|https://github.com/avicomp/ont-map]) I 
use Jena initialization subsystem to load library graphs from system resources 
in order to have them as some kind of singleton: they are used widely in API, 
which is desired to be fast as possible. Maybe yes, loading graphs while 
initialization is not very good idea, and I have to think to change it somehow. 
But for me this is a minor issue, and here is mostly for the record; the 
appropriate way to use the api implies explicit calling `JenaSystem.init()`


was (Author: szz):
In my case (the project https://github.com/avicomp/ont-map) I use Jena 
initialization subsystem to load library graphs from system resources in order 
to have them as some kind of singleton: they are used widely in API, which is 
desired to be fast as possible. Maybe yes, loading graphs while initialization 
is not very good idea, and I have to think to change it somehow. For me this is 
a minor issue, and here is mostly for the record; the appropriate way to use 
the api implies explicit calling `JenaSystem.init()`

> A minor initilization issue
> ---
>
> Key: JENA-1729
> URL: https://issues.apache.org/jira/browse/JENA-1729
> Project: Apache Jena
>  Issue Type: Bug
>  Components: Core
> Environment: java8(1.8.0_152), jena-arq:3.12.0
>Reporter: ssz
>Priority: Minor
> Fix For: Jena 3.12.0
>
>
> The following one-class program fails with assertion error:
>  
> {code:java}
> package xx.yy;
> import org.apache.jena.rdf.model.RDFNode;
> import org.apache.jena.rdf.model.ResourceFactory;
> import org.apache.jena.sys.JenaSubsystemLifecycle;
> import org.apache.jena.sys.JenaSystem;
> import org.apache.jena.vocabulary.RDF;
> public class InitTest implements JenaSubsystemLifecycle {
> @Override
> public void start() {
> if (JenaSystem.DEBUG_INIT)
> System.err.println("InitTEST -- start");
> assert RDF.type != null : "RDF#type is null => attempt to load a 
> graph here will fail";
> }
> @Override
> public void stop() {
> if (JenaSystem.DEBUG_INIT)
> System.err.println("InitTEST -- finish");
> }
> @Override
> public int level() {
> return 500;
> }
> public static void main(String... args) { // run VM option: -ea
> JenaSystem.DEBUG_INIT = true;
> //RDFNode r = ResourceFactory.createProperty("X"); // this works fine
> RDFNode r = ResourceFactory.createTypedLiteral("Y"); // this causes a 
> problem
> System.out.println(r);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (JENA-1729) A minor initilization issue

2019-07-08 Thread ssz (JIRA)


[ 
https://issues.apache.org/jira/browse/JENA-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16880243#comment-16880243
 ] 

ssz commented on JENA-1729:
---

In my case (the project https://github.com/avicomp/ont-map) I use Jena 
initialization subsystem to load library graphs from system resources in order 
to have them as some kind of singleton: they are used widely in API, which is 
desired to be fast as possible. Maybe yes, loading graphs while initialization 
is not very good idea, and I have to think to change it somehow. For me this is 
a minor issue, and here is mostly for the record; the appropriate way to use 
the api implies explicit calling `JenaSystem.init()`

> A minor initilization issue
> ---
>
> Key: JENA-1729
> URL: https://issues.apache.org/jira/browse/JENA-1729
> Project: Apache Jena
>  Issue Type: Bug
>  Components: Core
> Environment: java8(1.8.0_152), jena-arq:3.12.0
>Reporter: ssz
>Priority: Minor
> Fix For: Jena 3.12.0
>
>
> The following one-class program fails with assertion error:
>  
> {code:java}
> package xx.yy;
> import org.apache.jena.rdf.model.RDFNode;
> import org.apache.jena.rdf.model.ResourceFactory;
> import org.apache.jena.sys.JenaSubsystemLifecycle;
> import org.apache.jena.sys.JenaSystem;
> import org.apache.jena.vocabulary.RDF;
> public class InitTest implements JenaSubsystemLifecycle {
> @Override
> public void start() {
> if (JenaSystem.DEBUG_INIT)
> System.err.println("InitTEST -- start");
> assert RDF.type != null : "RDF#type is null => attempt to load a 
> graph here will fail";
> }
> @Override
> public void stop() {
> if (JenaSystem.DEBUG_INIT)
> System.err.println("InitTEST -- finish");
> }
> @Override
> public int level() {
> return 500;
> }
> public static void main(String... args) { // run VM option: -ea
> JenaSystem.DEBUG_INIT = true;
> //RDFNode r = ResourceFactory.createProperty("X"); // this works fine
> RDFNode r = ResourceFactory.createTypedLiteral("Y"); // this causes a 
> problem
> System.out.println(r);
> }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (JENA-1729) A minor initilization issue

2019-07-07 Thread ssz (JIRA)
ssz created JENA-1729:
-

 Summary: A minor initilization issue
 Key: JENA-1729
 URL: https://issues.apache.org/jira/browse/JENA-1729
 Project: Apache Jena
  Issue Type: Bug
  Components: Core
 Environment: java8(1.8.0_152), jena-arq:3.12.0
Reporter: ssz
 Fix For: Jena 3.12.0


The following one-class program fails with assertion error:

 
{code:java}
package xx.yy;

import org.apache.jena.rdf.model.RDFNode;
import org.apache.jena.rdf.model.ResourceFactory;
import org.apache.jena.sys.JenaSubsystemLifecycle;
import org.apache.jena.sys.JenaSystem;
import org.apache.jena.vocabulary.RDF;

public class InitTest implements JenaSubsystemLifecycle {
@Override
public void start() {
if (JenaSystem.DEBUG_INIT)
System.err.println("InitTEST -- start");
assert RDF.type != null : "RDF#type is null => attempt to load a graph 
here will fail";
}

@Override
public void stop() {
if (JenaSystem.DEBUG_INIT)
System.err.println("InitTEST -- finish");
}

@Override
public int level() {
return 500;
}

public static void main(String... args) { // run VM option: -ea
JenaSystem.DEBUG_INIT = true;
//RDFNode r = ResourceFactory.createProperty("X"); // this works fine
RDFNode r = ResourceFactory.createTypedLiteral("Y"); // this causes a 
problem
System.out.println(r);
}
}

{code}





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (JENA-1716) Can't find 3.12.0 maven release

2019-05-30 Thread ssz (JIRA)


 [ 
https://issues.apache.org/jira/browse/JENA-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ssz closed JENA-1716.
-
Resolution: Resolved

> Can't find 3.12.0 maven release
> ---
>
> Key: JENA-1716
> URL: https://issues.apache.org/jira/browse/JENA-1716
> Project: Apache Jena
>  Issue Type: Question
>  Components: Jena
>Affects Versions: Jena 3.12.0
>Reporter: ssz
>Priority: Minor
>
> Can't find 3.12.0 release 
> ([https://repository.apache.org/content/repositories/releases/org/apache/jena/jena-arq/3.12.0/]
>   - 404 Path /org/apache/jena/jena-arq/3.12.0/ not found in local storage of 
> repository "Releases" [id=releases]), although a github release is already 
> present. 
> I see that the previous release (3.11.0) was produced at the same day both in 
> github and in main repository. So Im wondering why such a delay? Is it 
> intentional ?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (JENA-1716) Can't find 3.12.0 maven release

2019-05-30 Thread ssz (JIRA)
ssz created JENA-1716:
-

 Summary: Can't find 3.12.0 maven release
 Key: JENA-1716
 URL: https://issues.apache.org/jira/browse/JENA-1716
 Project: Apache Jena
  Issue Type: Question
  Components: Jena
Affects Versions: Jena 3.12.0
Reporter: ssz


Can't find 3.12.0 release 
([https://repository.apache.org/content/repositories/releases/org/apache/jena/jena-arq/3.12.0/]
  - 404 Path /org/apache/jena/jena-arq/3.12.0/ not found in local storage of 
repository "Releases" [id=releases]), although a github release is already 
present. 

I see that the previous release (3.11.0) was produced at the same day both in 
github and in main repository. So Im wondering why such a delay? Is it 
intentional ?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (JENA-1710) Wrong turtle serialization of RDFList with itself inside

2019-05-09 Thread ssz (JIRA)


 [ 
https://issues.apache.org/jira/browse/JENA-1710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ssz updated JENA-1710:
--
Description: 
Testcase:
{quote}Model m = ModelFactory.createDefaultModel();

Resource b0 = m.createResource();
 Resource b1 = m.createResource();

{color:#808080}// add 4 statements:{color}

b0.addProperty(OWL.{color:#660e7a}unionOf{color}, 
b1).addProperty(RDF.{color:#660e7a}type{color}, 
OWL.{color:#660e7a}Class{color});
 b1.addProperty(RDF.{color:#660e7a}first{color}, 
b0).addProperty(RDF.{color:#660e7a}rest{color}, RDF.{color:#660e7a}nil{color});

m.write(System.{color:#660e7a}out{color}, {color:#008000}"ttl"{color});

m.write(System.{color:#660e7a}out{color}, {color:#008000}"nt"{color});
{quote}
Output:
{quote}_:b0    <[http://www.w3.org/1999/02/22-rdf-syntax-ns#first]>
     _:b1 ;
     <[http://www.w3.org/1999/02/22-rdf-syntax-ns#rest]>
     () .
 _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 
<[http://www.w3.org/1999/02/22-rdf-syntax-ns#rest]> 
<[http://www.w3.org/1999/02/22-rdf-syntax-ns#nil]> .
 _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 
<[http://www.w3.org/1999/02/22-rdf-syntax-ns#first]> 
_:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 .
 _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 
<[http://www.w3.org/1999/02/22-rdf-syntax-ns#type]> 
<[http://www.w3.org/2002/07/owl#Class]> .
 _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 
<[http://www.w3.org/2002/07/owl#unionOf]> 
_:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 .
{quote}
 

So in turtle there are only 2 triples, while expected 4.

  was:
Testcase:
{quote}Model m = ModelFactory.createDefaultModel();

Resource b0 = m.createResource();
Resource b1 = m.createResource();

{color:#808080}// 4 statements:
{color}b0.addProperty(OWL.{color:#660e7a}unionOf{color}, 
b1).addProperty(RDF.{color:#660e7a}type{color}, 
OWL.{color:#660e7a}Class{color});
b1.addProperty(RDF.{color:#660e7a}first{color}, 
b0).addProperty(RDF.{color:#660e7a}rest{color}, RDF.{color:#660e7a}nil{color});

m.write(System.{color:#660e7a}out{color}, {color:#008000}"ttl"{color});

m.write(System.{color:#660e7a}out{color}, {color:#008000}"nt"{color});
{quote}
Output:
{quote}_:b0    
    _:b1 ;
    
    () .
_:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 
 
 .
_:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 
 
_:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 .
_:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 
 
 .
_:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 
 
_:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 .
{quote}
 

So in turtle there are only 2 triples, while expected 4.


> Wrong turtle serialization of RDFList with itself inside
> 
>
> Key: JENA-1710
> URL: https://issues.apache.org/jira/browse/JENA-1710
> Project: Apache Jena
>  Issue Type: Bug
>  Components: Base, Jena, RIOT
>Affects Versions: Jena 3.9.0, Jena 3.10.0, Jena 3.11.0
> Environment: jena-arq-3.11.0, java8
>Reporter: ssz
>Priority: Minor
>
> Testcase:
> {quote}Model m = ModelFactory.createDefaultModel();
> Resource b0 = m.createResource();
>  Resource b1 = m.createResource();
> {color:#808080}// add 4 statements:{color}
> b0.addProperty(OWL.{color:#660e7a}unionOf{color}, 
> b1).addProperty(RDF.{color:#660e7a}type{color}, 
> OWL.{color:#660e7a}Class{color});
>  b1.addProperty(RDF.{color:#660e7a}first{color}, 
> b0).addProperty(RDF.{color:#660e7a}rest{color}, 
> RDF.{color:#660e7a}nil{color});
> m.write(System.{color:#660e7a}out{color}, {color:#008000}"ttl"{color});
> m.write(System.{color:#660e7a}out{color}, {color:#008000}"nt"{color});
> {quote}
> Output:
> {quote}_:b0    <[http://www.w3.org/1999/02/22-rdf-syntax-ns#first]>
>      _:b1 ;
>      <[http://www.w3.org/1999/02/22-rdf-syntax-ns#rest]>
>      () .
>  _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 
> <[http://www.w3.org/1999/02/22-rdf-syntax-ns#rest]> 
> <[http://www.w3.org/1999/02/22-rdf-syntax-ns#nil]> .
>  _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 
> <[http://www.w3.org/1999/02/22-rdf-syntax-ns#first]> 
> _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 .
>  _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 
> <[http://www.w3.org/1999/02/22-rdf-syntax-ns#type]> 
> <[http://www.w3.org/2002/07/owl#Class]> .
>  _:B4da6d814X2Ddb64X2D4ff1X2Da5d4X2D4f71d5718fd9 
> <[http://www.w3.org/2002/07/owl#unionOf]> 
> _:B40396d1bX2D68d6X2D40b4X2DbbcdX2Dbe185973bfc1 .
> {quote}
>  
>