Besides, digging into the source code is challenge for me, since I
didn't use it for long, and it is quite complicate for me. even using
it is a challenge. luckly I figure it out.

what I am doing to create my own project.xml, which including data
paths, modelling parameters, and filters to filtering my data. I used
to use my own style filter, ascii format, very amaturer, although it
works for a couple projects, eventually I fed up with fixing my own
filter packages for much power, so I decided to migrate to geotools
filter.

I am dealling with human geography data. did quite a bit coding to
develop a limited function of Filter.isContain(Filter). method for my
own use, it is limited because the real world filter is far too
complicate to know whether a filter can contain another filter
logically. it works only for a limited rules, extending it requires a
lot more research. Besides, I make features from person or household
data so filters can be used to select the right candidates.

Anyone interested, please let me know, work together.

yours

Jin

On Sun, Aug 16, 2009 at 6:34 PM, Jianhui Jin<[email protected]> 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