You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Damian Steer <d....@bristol.ac.uk> on 2011/10/17 23:12:18 UTC

Fwd: parsing RDF/XML sub-part with stax, using Jena?


Begin forwarded message:
> 
> So here's a mostly working (for ARP) version I wrote. [1] Use it in the following way:
> 
> SAX2Model s2m = SAX2Model.create(baseuri, model);  // ARP
> StAX2SAX converter = new StAX2SAX(s2m);
> converter.parse(xmlStreamReader);
> 
> Hope it works ok. Might be worth adding to jena.
> 
> Damian
> 
> [1] <https://gist.github.com/1257922>

[Moving this to jena-dev]

Any objections to me adding this to jena? It's a simple, self contained class. I should be able to use the existing SAX2Model tests.

Damian

Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Andy Seaborne <an...@apache.org>.
On 19/10/11 12:34, Andy Seaborne wrote:

> There are just 4 non-missing @Override warnings in the codebase.
>
> I'll commit the code with @Override (378 files) and with the Java level
> as environment "JavaSE-1.6". As it's one update, we can reverse it.

OK - sorry about all the commit messages - most projects updated now. 
Thankfully, I wasn't making all those changes myself; Eclispe did the work.

	Andy

Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Andy Seaborne <an...@apache.org>.
On 19/10/11 12:17, Andy Seaborne wrote:
> On 18/10/11 23:16, Damian Steer wrote:
>>
>> On 18 Oct 2011, at 11:36, Andy Seaborne wrote:
>>
>>> On 17/10/11 23:09, Damian Steer wrote:
>>>>
>>>> On 17 Oct 2011, at 22:33, Ian Dickinson wrote:
>>>>
>>>>> On 17/10/11 22:12, Damian Steer wrote:
>>>>>> Any objections to me adding this to jena?
>>>>> No objection. I would +1, but given the framing of the question I
>>>>> suspect I'd be objecting :)
>>>>>
>>>>> Ian
>>>>
>>>>
>>>> What could be clearer than a hearty -1 of agreement ;-)
>>>>
>>>> Damian
>>>
>>> I agree that adding it would be good (whether that is +1, -1 or -i !)
>>>
>>> Andy
>>
>> Added, with tests derived from SAX2RDF.
>>
>> Damian
>
> StAX2SAX requires Java6 for javax.xml.stream.events.* This is the straw.
>
> I'll reset the checked-in Eclipse settings to be compatible and start
> updating all the other projects.
>
>
> I get 3 warnings in Eclipse in StAX2SAX. Having a warnign free codebase
> is really helpful to a release manager.
>
>
> In Eclipse, I see 2732 warnings - all but 136 are missing @Override on
> interfaces (I'm not sure what the standard Eclipse settings are). Does
> anyone mind if I go and fix these and set the compiler level to warn on
> missing @Override for interface implementations?

Eclipse "quick fix" wasn't perfect for fixing missing @Overrides all in 
one go.  Nearly, but not quite.

There are just 4 non-missing @Override warnings in the codebase.

I'll commit the code with @Override (378 files) and with the Java level 
as environment "JavaSE-1.6".  As it's one update, we can reverse it.

	Andy

>
> Andy
>
>


Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Andy Seaborne <an...@apache.org>.
On 19/10/11 12:37, Damian Steer wrote:
>
> On 19 Oct 2011, at 12:17, Andy Seaborne wrote:
>
>> StAX2SAX requires Java6 for javax.xml.stream.events.*  This is the straw.
>
> Bah, sorry. The project is set for source 1.5, but it won't catch that.
>
> It's ARQ that requires StAX, of course.

Woodstox depends on the stax-api (from 2006!), which has an advanced 
copy in it.

>> I'll reset the checked-in Eclipse settings to be compatible and start updating all the other projects.
>>
>>
>> I get 3 warnings in Eclipse in StAX2SAX.  Having a warnign free codebase is really helpful to a release manager.
>
> All @Override? That's a 1.6 change, isn't it?

It became allowable at Java6 to have @Override on a method implementing 
an interface, not just overriding an (abstract) method.  It makes the 
treatment of interfaces and abstract classes more samey.

	Andy

> /me sees nothing in netbeans.
>
> Damian


Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 19 Oct 2011, at 12:17, Andy Seaborne wrote:

> StAX2SAX requires Java6 for javax.xml.stream.events.*  This is the straw.

Bah, sorry. The project is set for source 1.5, but it won't catch that.

It's ARQ that requires StAX, of course.

> I'll reset the checked-in Eclipse settings to be compatible and start updating all the other projects.
> 
> 
> I get 3 warnings in Eclipse in StAX2SAX.  Having a warnign free codebase is really helpful to a release manager.

All @Override? That's a 1.6 change, isn't it?

/me sees nothing in netbeans.

Damian

Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Andy Seaborne <an...@apache.org>.
On 18/10/11 23:16, Damian Steer wrote:
>
> On 18 Oct 2011, at 11:36, Andy Seaborne wrote:
>
>> On 17/10/11 23:09, Damian Steer wrote:
>>>
>>> On 17 Oct 2011, at 22:33, Ian Dickinson wrote:
>>>
>>>> On 17/10/11 22:12, Damian Steer wrote:
>>>>> Any objections to me adding this to jena?
>>>> No objection. I would +1, but given the framing of the question I suspect I'd be objecting :)
>>>>
>>>> Ian
>>>
>>>
>>> What could be clearer than a hearty -1 of agreement ;-)
>>>
>>> Damian
>>
>> I agree that adding it would be good (whether that is +1, -1 or -i !)
>>
>> 	Andy
>
> Added, with tests derived from SAX2RDF.
>
> Damian

StAX2SAX requires Java6 for javax.xml.stream.events.*  This is the straw.

I'll reset the checked-in Eclipse settings to be compatible and start 
updating all the other projects.


I get 3 warnings in Eclipse in StAX2SAX.  Having a warnign free codebase 
is really helpful to a release manager.


In Eclipse, I see 2732 warnings - all but 136 are missing @Override on 
interfaces (I'm not sure what the standard Eclipse settings are).  Does 
anyone mind if I go and fix these and set the compiler level to warn on 
missing @Override for interface implementations?

	Andy



Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 18 Oct 2011, at 11:36, Andy Seaborne wrote:

> On 17/10/11 23:09, Damian Steer wrote:
>> 
>> On 17 Oct 2011, at 22:33, Ian Dickinson wrote:
>> 
>>> On 17/10/11 22:12, Damian Steer wrote:
>>>> Any objections to me adding this to jena?
>>> No objection. I would +1, but given the framing of the question I suspect I'd be objecting :)
>>> 
>>> Ian
>> 
>> 
>> What could be clearer than a hearty -1 of agreement ;-)
>> 
>> Damian
> 
> I agree that adding it would be good (whether that is +1, -1 or -i !)
> 
> 	Andy

Added, with tests derived from SAX2RDF.

Damian

Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Andy Seaborne <an...@apache.org>.
On 17/10/11 23:09, Damian Steer wrote:
>
> On 17 Oct 2011, at 22:33, Ian Dickinson wrote:
>
>> On 17/10/11 22:12, Damian Steer wrote:
>>> Any objections to me adding this to jena?
>> No objection. I would +1, but given the framing of the question I suspect I'd be objecting :)
>>
>> Ian
>
>
> What could be clearer than a hearty -1 of agreement ;-)
>
> Damian

I agree that adding it would be good (whether that is +1, -1 or -i !)

	Andy

Re: parsing RDF/XML sub-part with stax, using Jena?

Posted by Damian Steer <d....@bristol.ac.uk>.
On 17 Oct 2011, at 22:33, Ian Dickinson wrote:

> On 17/10/11 22:12, Damian Steer wrote:
>> Any objections to me adding this to jena?
> No objection. I would +1, but given the framing of the question I suspect I'd be objecting :)
> 
> Ian


What could be clearer than a hearty -1 of agreement ;-)

Damian

Re: Fwd: parsing RDF/XML sub-part with stax, using Jena?

Posted by Ian Dickinson <ia...@epimorphics.com>.
On 17/10/11 22:12, Damian Steer wrote:
> Any objections to me adding this to jena?
No objection. I would +1, but given the framing of the question I 
suspect I'd be objecting :)

Ian