Well when you are interested in helping out let us know.

Jody

On 16/08/2009, at 8:34 PM, Jianhui Jin wrote:

> I did a way around, read in the xml, print out the xml again but
> escaping the empty <Filter></Filter> and then got what i want. Haha
>
> Jin
>
> On Sun, Aug 16, 2009 at 6:21 PM, Jody  
> Garnett<[email protected]> wrote:
>> I see; and trust you have reported this bug :-)
>> Back to the document writer were you able to patch  
>> FilterComplexTypes encode
>> method?
>>
>> Jody
>>
>> On 16/08/2009, at 7:39 PM, Jianhui Jin wrote:
>>
>>> Hi Jody
>>>
>>> When I use Encoder: (org.geotools.xml.Encoder) do:
>>> Encoder..encode(columnFilter,
>>> org.geotools.filter.v1_0.OGC.Filter, new BufferedOutputStream(new
>>> FileOutputStream("C:/users/jianhui jin/work/temp.xml"))) instead,  
>>> got
>>> exception:
>>> java.lang.NullPointerException
>>>      at
>>> org.geotools.xml.impl.SchemaIndexImpl.destroy(SchemaIndexImpl.java: 
>>> 96)
>>>      at org.geotools.xml.Encoder.encode(Encoder.java:1007)
>>>      at org.geotools.xml.Encoder.encode(Encoder.java:557)
>>>
>>> yours
>>>
>>> Jin
>>>
>>> On Sun, Aug 16, 2009 at 10:11 AM, Jody Garnett<[email protected] 
>>> >
>>> wrote:
>>>>
>>>> That sounds like a bug - you should step through the code and see  
>>>> what
>>>> happens when it finds a boolean. This document writer thing is  
>>>> focused on
>>>> the older specifications etc...  we have a current schema driven  
>>>> xml
>>>> encoding technology that is easier to maintain. Please check out
>>>>
>>>> http://docs.codehaus.org/display/GEOTDOC/05+GTXML+Parsing+and+Encoding 
>>>>  and
>>>> see if it handles boolean correctly for you?
>>>>
>>>> When you do have a patch please create a jira bug report and  
>>>> attach the
>>>> patch w/ test case.
>>>>
>>>> As for DocumentWriter please reivew  FilterComplexTypes line  
>>>> 1408 ... the
>>>> encode method here looks to be responsible for encoding Literal
>>>> expressions.
>>>>
>>>> Jody
>>>>
>>>> On 15/08/2009, at 7:00 PM, Jianhui Jin wrote:
>>>>
>>>>> Hi All
>>>>>
>>>>> "FilterFactory ff =
>>>>> CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
>>>>> ff.equals(ff.property("isHousehold"), ff.literal(true);"
>>>>>
>>>>> in the outputed xml file, there is no literal of true
>>>>>
>>>>> when i use ff.equals(ff.property("isHousehold"),  
>>>>> ff.literal("true")
>>>>> instead, the literal appears.
>>>>>
>>>>> don't whether it is a bug in the filterfactory or in the encoder,
>>>>> probably the encoder, i am using
>>>>>
>>>>> " DocumentWriter.writeFragment(
>>>>>                          columnFilter,
>>>>>
>>>>>
>>>>>
>>>>> SchemaFactory 
>>>>> .getInstance 
>>>>> (org.geotools.filter.v1_0.OGC.Filter.getNamespaceURI()),
>>>>>                          printwriter,
>>>>>
>>>>> OGCSchema.getInstance().getImplementationHints());
>>>>> "
>>>>>
>>>>> in the last few emails, i reported another issue with  
>>>>> documentwriter.
>>>>>
>>>>> Anyone help?
>>>>>
>>>>> need to use it urgently.
>>>>>
>>>>> Jin
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Let Crystal Reports handle the reporting - Free Crystal Reports  
>>>>> 2008
>>>>> 30-Day
>>>>> trial. Simplify your report design, integration and deployment -  
>>>>> and
>>>>> focus
>>>>> on
>>>>> what you do best, core application coding. Discover what's new  
>>>>> with
>>>>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>>>>> _______________________________________________
>>>>> Geotools-gt2-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>>>>
>>>>
>>
>>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to