On Fri, Nov 30, 2012 at 11:01 AM, Andrea Aime
<andrea.a...@geo-solutions.it>wrote:

> On Fri, Nov 30, 2012 at 5:52 PM, Justin Deoliveira 
> <jdeol...@opengeo.org>wrote:
>
>>
>> Wondering about StreamingParser... should it be deprecated?
>>>  More in general, what's the relationship between it and PullParser?
>>> One replaces the other, they have different features and thus different
>>> intended
>>> use cases?
>>>
>> Yeah, we should probably deprecate it as the two more or less provide the
>> same api. The streaming parser however does offer a jxpath option that the
>> pull parser does not.
>>
>
> Interesting... could you elaborate on this jxpath thing? :-)
>

Sure. Basically the streaming parser, and now the pull parser, needs to
know when to stop its main parsing cycle and return back to the caller,
passing back the object at the top of its parsing stack. The streaming
parser offers three options for this:

1. An element qname - the name of an element upon which to return when
hitting its closing edge, for example after every element named
"gml:featureMember" to stream out feature objects

2. A java class - A classname for which to return from parsing when a
binding produces an object of this class, again the common case being to
parse out all feature objects

3. An xpath - Same idea as (1) but instead of a simple element name a full
blown xpath. This could potentially handle things like nested features
where we only want to stop on the top level features, rather than return
individual nested features

(1) and (2) is pretty easy, (3) was hard and very expensive because it
involves continually evaluating the current path to see if it matches the
xpath specified by the user. And in general never saw all that much use
afaik. The app schema folks might be using it though.

Hope that makes sense.

Cheers
> Andrea
>
>
> --
> ==
> Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
> information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> phone: +39 0584 962313
> fax: +39 0584 1660272
> mob: +39  339 8844549
>
> http://www.geo-solutions.it
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
>


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to