[Geoserver-users] [Geotools-gt2-users] How to use Filter XML Support ?

Cool, glad to hear things are working. Is this the entire document below. I notice that is are no namespace mappings?

-Justin

Fabio Luiz Leite wrote:

Hi Justin, very thank you !! Everything worked fine !

Now, I have some problems with the follwing filter sample:

   <Disjoint>
        <PropertyName>Geometry</PropertyName>
        <gml:Box srsName=" http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
            <gml:coordinates>13.0983,31.589935.5472,42.8143</gml:coordinates>
        </gml:Box>
    </Disjoint>

It's occurring an error during the parsing. The error message is:

       org.xml.sax.SAXException: Handler for gml:Box could not be found.

Do you know what is happen ? The java code is the same of the example of the user's guide.

On 1/22/07, *Justin Deoliveira* < jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:

    Hi Fabio,

    I have updated the page which lists the dependencies you will need.
    There are quite a few of them :).

    -Justin

    Fabio Luiz Leite wrote:
     > Justin,
     > It's ocurring errors yet. I change the old libraries for new
     > libraries (gt2-xml-xsd-2.4-SNAPSHOT.jar ,
     > gt2-xml-filter-2.4-SNAPSHOT.jar,
     > gt2-xml-gml2-2.4-SNAPSHOT.jar,
     > gt2-main-2-2.4-SNAPSHOT )
     > and so on.
     >
     > The error is the following:
     >
     > java.lang.NoClassDefFoundError : org/geotools/resources/Utilities
     >
     > Where are this class ? What is the remaining package ?
     >
     > On 1/22/07, *Justin Deoliveira* <jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>
     > <mailto:jdeolive@anonymised.com>>
    wrote:
     >
     > Hi Fabio,
     >
     > I just added a faq for your question :).
     >
     > http://docs.codehaus.org/display/GEOTDOC/XML+Parsing+and+Encoding+FAQ
     >
     > Also, if you want you can use svn to check out the source
    code directly
     > from our geotools repository.
     >
     > http://svn.geotools.org/geotools/trunk/gt
     >
     > -Justin
     >
     > Fabio Luiz Leite wrote:
     > > Hi Justin (and all),
     > >
     > > How to parse a ogc filter using version 2.3 ? I tryed the
    following
     > > code, but an error happened on creation of FilterFilter:
     > >
     > > // instantiante parsers and content handlers
     > > MyHandler contentHandler = new MyHandler();
     > > FilterFilter filterParser = new
     > FilterFilter(contentHandler, null);
     > > GMLFilterGeometry geometryFilter = new
     > > GMLFilterGeometry(filterParser);
     > > GMLFilterDocument documentFilter = new
     > > GMLFilterDocument(geometryFilter);
     > >
     > > // read in XML file and parse to content handler
     > >
     > > SAXParserFactory factory =
    SAXParserFactory.newInstance();
     > > SAXParser parser = factory.newSAXParser();
     > > ParserAdapter adapter = new ParserAdapter(
     > parser.getParser());
     > > adapter.setContentHandler(documentFilter);
     > > adapter.parse(requestSource);
     > >
     > > assertEquals(contentHandler.filters.size (),1);
     > >
     > > LogicFilterImpl f = (LogicFilterImpl)
     > contentHandler.filters.get(0);
     > > List sub = f.getChildren();
     > > assertEquals(2, sub.size());
     > >
     > > Filter f1 = (Filter) sub.get(0);
     > > Filter f2 = (Filter) sub.get(1);
     > >
     > assertEquals(FilterType.GEOMETRY_INTERSECTS ,f1.getFilterType());
     > > assertEquals(FilterType.GEOMETRY_BBOX,
    f2.getFilterType());
     > >
     > > Could you tell me more info about how to get the 2.4
    version ? I am
     > > interested.
     > >
     > > On 1/22/07, *Justin Deoliveira* <jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>
     > <mailto: jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>>
     > > <mailto:jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com> <mailto:jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>>>>
     > wrote:
     > >
     > > Hi Fabio,
     > >
     > > Actually this a new way to parse a filter and is only
     > available in
     > > geotools 2.4 which is yet to be released.
     > >
     > > If you want to use this code, you will need to check
    out the
     > geotools
     > > 2.4 ( trunk ) branch and build it from source.
     > >
     > > Let me know if you are interested and want more info
    on how
     > to do so.
     > >
     > > -Justin
     > >
     > > Fabio Luiz Leite wrote:
     > > > Hi all,
     > > > i'm trying to run an example of the user
    guide about
     > > Filter XML
     > > > Support. But, when i run the sample, i'm getting a
    lot of
     > errors.
     > > >
     > > > The parser in the sample follows:
     > > >
     > > > //create the parser with the filter 1.0 configuration
     > > > org.geotools.xml.Configuration = new
     > > org.geotools.filter.v1_0.OGCConfiguration ();
     > > > org.geotools.xml.Parser
     > > > parser = new org.geotools.xml.Parser( configuration );
     > > >
     > > > //the xml instance document above
     > > > InputStream xml = ...
     > > >
     > > > //parse
     > > > Filter filter = (Filter) parser.parse( xml );
     > > >
     > > > Is this a deprecated way to parse a filter ?
     > > > How to run this code using geotools version 2.3 ?
     > > >
     > > > Thanks in advance !
     > > >
     > > > --
     > > > Fábio Luiz Leite Júnior
     > > >
     > >
     > ------------------------------------------------------------------------

     > > >
     > >
     > -------------------------------------------------------------------------
     >
     > > > Take Surveys. Earn Cash. Influence the Future of IT
     > > > Join SourceForge.net's Techsay panel and you'll get the
     > chance to
     > > share your
     > > > opinions on IT & business topics through brief
    surveys -
     > and earn
     > > cash
     > > >
     > >
     > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
     > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;
     > >
     > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
     > <
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;&gt;
     > > >
     > >
     > ------------------------------------------------------------------------
     > > >
     > > > _______________________________________________
     > > > Geotools-gt2-users mailing list
     > > > Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>
     > <mailto:Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>>
     > > <mailto: Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>
     > <mailto: Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>>>
     > > >
     > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
    <https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users&gt;
     > > >
     > >
     > > --
     > > Justin Deoliveira
     > > jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>
    <mailto:jdeolive@anonymised.com>
     > <mailto: jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com> <mailto:jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>>>
     > > The Open Planning Project
     > > http://topp.openplans.org
     > >
     > > --
     > > Fábio Luiz Leite Júnior !DSPAM:1004,45b52227100181510810322!
     > >
     > ------------------------------------------------------------------------
     > >
     > -------------------------------------------------------------------------
     >
     > > Take Surveys. Earn Cash. Influence the Future of IT
     > > Join SourceForge.net's Techsay panel and you'll get the
    chance to
     > share your
     > > opinions on IT & business topics through brief surveys -
    and earn
     > cash
     > >
     > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
     > <
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;
     > >
     > > !DSPAM:1004,45b52227100181510810322!
     > >
     > ------------------------------------------------------------------------
     > >
     > > _______________________________________________
     > > Geotools-gt2-users mailing list
     > > Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>
     > <mailto: Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>>
     > >
    https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
     > >
     > > !DSPAM:1004,45b52227100181510810322!
     >
     > --
     > Justin Deoliveira
     > jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>
    <mailto: jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>>
     > The Open Planning Project
     > http://topp.openplans.org
     >
     > --
     > Fábio Luiz Leite Júnior !DSPAM:1004,45b5320e112911410093335!

    --
    Justin Deoliveira
    jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>
    The Open Planning Project
    http://topp.openplans.org

--
Fábio Luiz Leite Júnior !DSPAM:1004,45b64365265651194215290!

--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org

looking at the code sample, the namespace mapping for gml is missing. If you add the attribute xmlns:gml="http://www.opengis.net/gml&quot; to the root Filter element it should work fine.

-Justin

Justin Deoliveira wrote:

Cool, glad to hear things are working. Is this the entire document below. I notice that is are no namespace mappings?

-Justin

Fabio Luiz Leite wrote:

Hi Justin, very thank you !! Everything worked fine !

Now, I have some problems with the follwing filter sample:

   <Disjoint>
        <PropertyName>Geometry</PropertyName>
        <gml:Box srsName=" http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;
            <gml:coordinates>13.0983,31.589935.5472,42.8143</gml:coordinates>
        </gml:Box>
    </Disjoint>

It's occurring an error during the parsing. The error message is:

       org.xml.sax.SAXException: Handler for gml:Box could not be found.

Do you know what is happen ? The java code is the same of the example of the user's guide.

On 1/22/07, *Justin Deoliveira* < jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:

    Hi Fabio,

    I have updated the page which lists the dependencies you will need.
    There are quite a few of them :).

    -Justin

    Fabio Luiz Leite wrote:
     > Justin,
     > It's ocurring errors yet. I change the old libraries for new
     > libraries (gt2-xml-xsd-2.4-SNAPSHOT.jar ,
     > gt2-xml-filter-2.4-SNAPSHOT.jar,
     > gt2-xml-gml2-2.4-SNAPSHOT.jar,
     > gt2-main-2-2.4-SNAPSHOT )
     > and so on.
     >
     > The error is the following:
     >
     > java.lang.NoClassDefFoundError : org/geotools/resources/Utilities
     >
     > Where are this class ? What is the remaining package ?
     >
     > On 1/22/07, *Justin Deoliveira* <jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>
     > <mailto:jdeolive@anonymised.com>>
    wrote:
     >
     > Hi Fabio,
     >
     > I just added a faq for your question :).
     >
     > http://docs.codehaus.org/display/GEOTDOC/XML+Parsing+and+Encoding+FAQ
     >
     > Also, if you want you can use svn to check out the source
    code directly
     > from our geotools repository.
     >
     > http://svn.geotools.org/geotools/trunk/gt
     >
     > -Justin
     >
     > Fabio Luiz Leite wrote:
     > > Hi Justin (and all),
     > >
     > > How to parse a ogc filter using version 2.3 ? I tryed the
    following
     > > code, but an error happened on creation of FilterFilter:
     > >
     > > // instantiante parsers and content handlers
     > > MyHandler contentHandler = new MyHandler();
     > > FilterFilter filterParser = new
     > FilterFilter(contentHandler, null);
     > > GMLFilterGeometry geometryFilter = new
     > > GMLFilterGeometry(filterParser);
     > > GMLFilterDocument documentFilter = new
     > > GMLFilterDocument(geometryFilter);
     > >
     > > // read in XML file and parse to content handler
     > >
     > > SAXParserFactory factory =
    SAXParserFactory.newInstance();
     > > SAXParser parser = factory.newSAXParser();
     > > ParserAdapter adapter = new ParserAdapter(
     > parser.getParser());
     > > adapter.setContentHandler(documentFilter);
     > > adapter.parse(requestSource);
     > >
     > > assertEquals(contentHandler.filters.size (),1);
     > >
     > > LogicFilterImpl f = (LogicFilterImpl)
     > contentHandler.filters.get(0);
     > > List sub = f.getChildren();
     > > assertEquals(2, sub.size());
     > >
     > > Filter f1 = (Filter) sub.get(0);
     > > Filter f2 = (Filter) sub.get(1);
     > >
     > assertEquals(FilterType.GEOMETRY_INTERSECTS ,f1.getFilterType());
     > > assertEquals(FilterType.GEOMETRY_BBOX,
    f2.getFilterType());
     > >
     > > Could you tell me more info about how to get the 2.4
    version ? I am
     > > interested.
     > >
     > > On 1/22/07, *Justin Deoliveira* <jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>
     > <mailto: jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>>
     > > <mailto:jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com> <mailto:jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>>>>
     > wrote:
     > >
     > > Hi Fabio,
     > >
     > > Actually this a new way to parse a filter and is only
     > available in
     > > geotools 2.4 which is yet to be released.
     > >
     > > If you want to use this code, you will need to check
    out the
     > geotools
     > > 2.4 ( trunk ) branch and build it from source.
     > >
     > > Let me know if you are interested and want more info
    on how
     > to do so.
     > >
     > > -Justin
     > >
     > > Fabio Luiz Leite wrote:
     > > > Hi all,
     > > > i'm trying to run an example of the user
    guide about
     > > Filter XML
     > > > Support. But, when i run the sample, i'm getting a
    lot of
     > errors.
     > > >
     > > > The parser in the sample follows:
     > > >
     > > > //create the parser with the filter 1.0 configuration
     > > > org.geotools.xml.Configuration = new
     > > org.geotools.filter.v1_0.OGCConfiguration ();
     > > > org.geotools.xml.Parser
     > > > parser = new org.geotools.xml.Parser( configuration );
     > > >
     > > > //the xml instance document above
     > > > InputStream xml = ...
     > > >
     > > > //parse
     > > > Filter filter = (Filter) parser.parse( xml );
     > > >
     > > > Is this a deprecated way to parse a filter ?
     > > > How to run this code using geotools version 2.3 ?
     > > >
     > > > Thanks in advance !
     > > >
     > > > --
     > > > Fábio Luiz Leite Júnior
     > > >
     > >
     > ------------------------------------------------------------------------

     > > >
     > >
     > -------------------------------------------------------------------------
     >
     > > > Take Surveys. Earn Cash. Influence the Future of IT
     > > > Join SourceForge.net's Techsay panel and you'll get the
     > chance to
     > > share your
     > > > opinions on IT & business topics through brief
    surveys -
     > and earn
     > > cash
     > > >
     > >
     > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
     > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;
     > >
     > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
     > <
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;&gt;
     > > >
     > >
     > ------------------------------------------------------------------------
     > > >
     > > > _______________________________________________
     > > > Geotools-gt2-users mailing list
     > > > Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>
     > <mailto:Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>>
     > > <mailto: Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>
     > <mailto: Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>>>
     > > >
     > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
    <https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users&gt;
     > > >
     > >
     > > --
     > > Justin Deoliveira
     > > jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>
    <mailto:jdeolive@anonymised.com>
     > <mailto: jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com> <mailto:jdeolive@anonymised.com
    <mailto:jdeolive@anonymised.com>>>
     > > The Open Planning Project
     > > http://topp.openplans.org
     > >
     > > --
     > > Fábio Luiz Leite Júnior > >
     > >
     > ------------------------------------------------------------------------
     > >
     > -------------------------------------------------------------------------
     >
     > > Take Surveys. Earn Cash. Influence the Future of IT
     > > Join SourceForge.net's Techsay panel and you'll get the
    chance to
     > share your
     > > opinions on IT & business topics through brief surveys -
    and earn
     > cash
     > >
     > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;
     > <
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV&gt;&gt;
     > >
     > > !DSPAM:1004,45b52227100181510810322!
     > >
     > ------------------------------------------------------------------------
     > >
     > > _______________________________________________
     > > Geotools-gt2-users mailing list
     > > Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>
     > <mailto: Geotools-gt2-users@lists.sourceforge.net
    <mailto:Geotools-gt2-users@lists.sourceforge.net>>
     > >
    https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
     > >
     > > !DSPAM:1004,45b52227100181510810322!
     >
     > --
     > Justin Deoliveira
     > jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>
    <mailto: jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>>
     > The Open Planning Project
     > http://topp.openplans.org
     >
     > --
     > Fábio Luiz Leite Júnior !DSPAM:1004,45b5320e112911410093335!

    --
    Justin Deoliveira
    jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>
    The Open Planning Project
    http://topp.openplans.org

--
Fábio Luiz Leite Júnior !DSPAM:1004,45b64365265651194215290!

--
Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org

Yes, Justin ! The xml have the attribute xmlns:gml. However, its value was http://schemas.opengis.net/gml/3.1.0/base/gml.xsd. I changed the atribute value to " http://www.opengis.net/gml" and it’s work fine !

Thank’s one more time !

On 1/23/07, Justin Deoliveira <jdeolive@anonymised.com> wrote:

looking at the code sample, the namespace mapping for gml is missing. If
you add the attribute xmlns:gml=“http://www.opengis.net/gml” to the root
Filter element it should work fine.

-Justin

Justin Deoliveira wrote:

Cool, glad to hear things are working. Is this the entire document
below. I notice that is are no namespace mappings?

-Justin

Fabio Luiz Leite wrote:

Hi Justin, very thank you !! Everything worked fine !

Now, I have some problems with the follwing filter sample:

Geometry

gml:coordinates13.0983,31.589935.5472 ,42.8143</gml:coordinates>
</gml:Box>

It’s occurring an error during the parsing. The error message is:

org.xml.sax.SAXException: Handler for gml:Box could not be found.

Do you know what is happen ? The java code is the same of the example
of the user’s guide.

On 1/22/07, Justin Deoliveira < jdeolive@anonymised.com
mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)> wrote:

Hi Fabio,

I have updated the page which lists the dependencies you will need.
There are quite a few of them :).

-Justin

Fabio Luiz Leite wrote:

Justin,
It’s ocurring errors yet. I change the old libraries for new
libraries (gt2-xml-xsd-2.4-SNAPSHOT.jar ,
gt2-xml-filter-2.4-SNAPSHOT.jar,
gt2-xml-gml2-2.4-SNAPSHOT.jar,
gt2-main-2-2.4-SNAPSHOT )
and so on.

The error is the following:

java.lang.NoClassDefFoundError : org/geotools/resources/Utilities

Where are this class ? What is the remaining package ?

On 1/22/07, Justin Deoliveira <jdeolive@anonymised.com
mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com..)
<mailto:jdeolive@anonymised.com mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)>>
wrote:

Hi Fabio,

I just added a faq for your question :).

http://docs.codehaus.org/display/GEOTDOC/XML+Parsing+and+Encoding+FAQ

Also, if you want you can use svn to check out the source
code directly
from our geotools repository.

http://svn.geotools.org/geotools/trunk/gt

-Justin

Fabio Luiz Leite wrote:

Hi Justin (and all),

How to parse a ogc filter using version 2.3 ? I tryed the
following
code, but an error happened on creation of FilterFilter:

// instantiante parsers and content handlers
MyHandler contentHandler = new MyHandler();
FilterFilter filterParser = new
FilterFilter(contentHandler, null);
GMLFilterGeometry geometryFilter = new
GMLFilterGeometry(filterParser);
GMLFilterDocument documentFilter = new
GMLFilterDocument(geometryFilter);

// read in XML file and parse to content handler

SAXParserFactory factory =
SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
ParserAdapter adapter = new ParserAdapter(
parser.getParser());
adapter.setContentHandler(documentFilter);
adapter.parse(requestSource);

assertEquals( contentHandler.filters.size (),1);

LogicFilterImpl f = (LogicFilterImpl)
contentHandler.filters.get(0);
List sub = f.getChildren();
assertEquals(2, sub.size());

Filter f1 = (Filter) sub.get(0);
Filter f2 = (Filter) sub.get(1);

assertEquals(FilterType.GEOMETRY_INTERSECTS ,f1.getFilterType());

assertEquals( FilterType.GEOMETRY_BBOX,
f2.getFilterType());

Could you tell me more info about how to get the 2.4
version ? I am
interested.

On 1/22/07, Justin Deoliveira <jdeolive@anonymised.com
mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)
<mailto: jdeolive@anonymised.com <mailto: jdeolive@anonymised.com>>
<mailto:jdeolive@anonymised.com
<mailto:jdeolive@anonymised.com > <mailto:jdeolive@anonymised.com
mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)>>>
wrote:

Hi Fabio,

Actually this a new way to parse a filter and is only
available in
geotools 2.4 which is yet to be released.

If you want to use this code, you will need to check
out the
geotools
2.4 ( trunk ) branch and build it from source.

Let me know if you are interested and want more info
on how
to do so.

-Justin

Fabio Luiz Leite wrote:

Hi all,
i’m trying to run an example of the user
guide about
Filter XML
Support. But, when i run the sample, i’m getting a
lot of
errors.

The parser in the sample follows:

//create the parser with the filter 1.0 configuration
org.geotools.xml.Configuration = new
org.geotools.filter.v1_0.OGCConfiguration ();
org.geotools.xml.Parser
parser = new org.geotools.xml.Parser ( configuration );

//the xml instance document above
InputStream xml = …

//parse
Filter filter = (Filter) parser.parse( xml );

Is this a deprecated way to parse a filter ?
How to run this code using geotools version 2.3 ?

Thanks in advance !


Fábio Luiz Leite Júnior



Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the
chance to
share your
opinions on IT & business topics through brief
surveys -
and earn
cash

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >

<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>>

<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>

<
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
< http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>>>



Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
<mailto:Geotools-gt2-users@lists.sourceforge.net >
<mailto:Geotools-gt2-users@lists.sourceforge.net
<mailto: Geotools-gt2-users@lists.sourceforge.net>>
<mailto: Geotools-gt2-users@lists.sourceforge.net
<mailto: Geotools-gt2-users@lists.sourceforge.net>
<mailto: Geotools-gt2-users@lists.sourceforge.net
mailto:[Geotools-gt2-users@anonymised.comet](mailto:Geotools-gt2-users@lists.sourceforge.net)>>

https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
< https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users>


Justin Deoliveira
jdeolive@anonymised.com mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)
<mailto:jdeolive@anonymised.com <mailto: jdeolive@anonymised.com>>
<mailto: jdeolive@anonymised.com
<mailto:jdeolive@anonymised.com > <mailto:jdeolive@anonymised.com
mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)>>
The Open Planning Project
http://topp.openplans.org <http://topp.openplans.org>


Fábio Luiz Leite Júnior



Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net’s Techsay panel and you’ll get the
chance to
share your
opinions on IT & business topics through brief surveys -
and earn
cash

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
<http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>

<
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
< http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>>

!DSPAM:1004,45b52227100181510810322!



Geotools-gt2-users mailing list
Geotools-gt2-users@anonymised.comts.sourceforge.net
<mailto: Geotools-gt2-users@lists.sourceforge.net>
<mailto: Geotools-gt2-users@lists.sourceforge.net
mailto:[Geotools-gt2-users@anonymised.comet](mailto:Geotools-gt2-users@lists.sourceforge.net)>

https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

!DSPAM:1004,45b52227100181510810322!


Justin Deoliveira
jdeolive@anonymised.com <mailto: jdeolive@anonymised.com>
<mailto: jdeolive@anonymised.com mailto:[jdeolive@anonymised.com](mailto:jdeolive@anonymised.com)>
The Open Planning Project
http://topp.openplans.org


Fábio Luiz Leite Júnior !DSPAM:1004,45b5320e112911410093335!


Justin Deoliveira
jdeolive@anonymised.com <mailto:jdeolive@anonymised.com >
The Open Planning Project
http://topp.openplans.org


Fábio Luiz Leite Júnior !DSPAM:1004,45b64365265651194215290!


Justin Deoliveira
jdeolive@anonymised.com
The Open Planning Project
http://topp.openplans.org


Fábio Luiz Leite Júnior