Evening Mr Maróy:

> > Grab a very small sample document, and the XSD files it referenced by
> > it, and try the parser as is. Use the test cases for an example of how
> > to set up a GML configuration etc…
>  
> can you please be more specific on which test cases?

I am not the module maintainer of the xml parsing stuff, so I always have to 
hunt around myself.

GML and GMLTest

Lets see what we can find:
- GMLTest <-- this is one I wrote that covers a lot of the different parsers

The GML class was my attempt to make it easy for users to use the different 
parsers and not notice what is going on behind the scenes, in particular:
- GML.iterator( StreamingParser) method should be very helpful
- GML.simpleFeature( obj, schema ) will convert a Map<?,?> to a feature - for 
GML files that have not been correctly produced with a schema

GTXML

I started by searching for GML32TestSupport and then searching for references 
to that file, resulting in the following:

BoundingShapeTypeBindingTest
LinearRingTypeBindingTest
LineStringTypeBindingTest
MultiCurveTypeBindingTest
MultiPointTypeBindingTest
MultiSurfaceTypeBindingTest
PointTypeBindingTest
PolygonTypeBindingTest
SurfaceTypeBindingTest


A lot of these were not that useful:

    public void testEncode() throws Exception {
        Document dom = encode(GML3MockData.multiLineString(), GML.MultiCurve);
        print(dom);
         
        XMLAssert.assertXpathEvaluatesTo("2", "count(//gml:curveMember)", dom);
        XMLAssert.assertXpathEvaluatesTo("2", "count(//gml:LineString)", dom);
    }


But the base GML32TestSupport is fairly good at showing how to set things up.

GMLParsingTest.testParseFeatureCollection is a bit better, and shows how to get 
things out as a feature collection.
> > class). Get that turning over, and only then can we start wrapping the
> > functionality up in a DataStore API (as per the datastore tutorials).
>  
> this is the starting point I'm looking for


Start with GMLParsingTest.testParseFeatureCollection then … it is a complete 
example starting from a XML and XSD file.
> I tried, and I had to face the fact that I can't afford this at the
> moment. the project I'm doing is a non-profit open source project done
> in my free time and from my personal resources. (OTOH, we just won the
> Hungarian Open Source Project of the year award, organized by
> ComputerWorld Hungary & IDG)

I do understand, just thought I would make the offer (they are an excellent set 
of organisations providing support).

Jody
------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to