Re: [Geotools-devel] Problems with WMS client contacting an Inspire enabled GeoServer

2013-02-05 Thread Ben Caradoc-Davies
app-schema uses the app-schema-resolver implementation to obtain schemas 
from the classpath (jar files), oasis calogs, or cached downloads. It is 
designed to drive the XML encoder, and solve the problem of cross-module 
relative imports (import of ../../../whatever) from different sources. 
It does not use the URIResolver interface. It implements the GeoTools 
SchemaLocationResolver interface. See:
http://docs.geotools.org/latest/userguide/extension/app-schema.html#application-schema-resolver

I would have to think more about what youse are trying to do, but 
app-schema-resolver has no dependencies on app-schema and could be the 
basis of a solution.

Kind regards,
Ben.

On 05/02/13 23:20, Justin Deoliveira wrote:
> I wonder if a third alternative would be to utilize the URIResolver apis
> already present in the jdk. If I am not mistaken the app-schema folks
> use this to solive this same problem. Maybe Ben or Rini can comment on
> that.

-- 
Ben Caradoc-Davies 
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Problems with WMS client contacting an Inspire enabled GeoServer

2013-02-05 Thread Andrea Aime
Il giorno 05/feb/2013 16:39, "Justin Deoliveira"  ha
scritto:
>
> I wonder if a third alternative would be to utilize the URIResolver apis
already present in the jdk. If I am not mistaken the app-schema folks use
this to solive this same problem. Maybe Ben or Rini can comment on that.
>
> At what point are the schemas downloaded? Are they done by the underlying
xml parser, or by the geotools xml code?

As far as I remember from conversation with Mauro creating a resolver was
the firsy choice, but the parser used for the wms 1.3 caps is the old one
that came before gt-xsd, and it seems a bit peculiar vs schema loading

Cheers
Andrea
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Problems with WMS client contacting an Inspire enabled GeoServer

2013-02-05 Thread Andrea Aime
Il giorno 05/feb/2013 16:39, "Justin Deoliveira"  ha
scritto:
>
> I wonder if a third alternative would be to utilize the URIResolver apis
already present in the jdk. If I am not mistaken the app-schema folks use
this to solive this same problem. Maybe Ben or Rini can comment on that.
>
> At what point are the schemas downloaded? Are they done by the underlying
xml parser, or by the geotools xml code?

As far as I remember from conversation with Mauro creating a resolver was
the firsy choice, but the parser used for the wms 1.3 caps is the old one
that came before gt-xsd, and it seems a bit peculiar vs schema loading

Cheers
Andrea
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Proposal Replace Contribution Agreement

2013-02-05 Thread Frank Warmerdam
On Feb 4, 2013 6:53 PM, "Ben Caradoc-Davies" 
wrote:

>
> I was going to ask Frank for more detail, but reading his original email,
it is all there:
>
http://osgeo-org.1560.n6.nabble.com/Contribution-Agreement-Clarity-td5022284.html
>
> My understanding of this is that Google does not want to make patent
grants to a project that could use them for anything.
>
> - Frank, am I reading this right?
>
> - Is the issue that Google want to contribute to software, but GeoTools
as it stands could produce non-software products (mobile phones,
self-driving cars, ...)? And a new contributor agreement would address this.
>
> Thanks again for following up on this, Frank. Your efforts are much
appreciated.

Ben,

I hesitate to re-characterize Daniel Berlins statement.  :-)  I asked him
to write it in his own words so I could avoid speaking on legal matters.

Best regards,

>
> Kind regards,
>
>
> --
> Ben Caradoc-Davies 
> Software Engineer
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Problems with WMS client contacting an Inspire enabled GeoServer

2013-02-05 Thread Justin Deoliveira
I wonder if a third alternative would be to utilize the URIResolver apis
already present in the jdk. If I am not mistaken the app-schema folks use
this to solive this same problem. Maybe Ben or Rini can comment on that.

At what point are the schemas downloaded? Are they done by the underlying
xml parser, or by the geotools xml code?




On Tue, Feb 5, 2013 at 6:28 AM, Andrea Aime wrote:

> On Tue, Feb 5, 2013 at 12:43 PM, Mauro Bartolomeoli <
> mauro.bartolome...@geo-solutions.it> wrote:
>
>> I have two options:
>>  * simplest one: SchemaFactory looks in classpath for schemas.properties
>> files containing uri -> localpath bindings used for preloading and caching
>> schemas. The content of schema.properties would be similar to this one:
>>
>> http://www.w3.org/2001/xml.xsd=xml.xsd
>>
>>  * more extensible one: a new interface SchemaLoader could be introduced.
>> to delegate schema loading; the interface will have two methods:
>>   - boolean canLoad(URL url)
>>   - Schema loadSchema(URL url)
>>SchemaLoader implementation will be looked up with the SPI method
>> during startup and used to load schemas when needed.
>>
>
> Either option works for me, both are pluggable in some sense, the second
> is more general in that it would allow building a Schema
> out of non local classpath sources, but it's also more work for the
> implementor as they have to also build the Schema.
> Another option could be to have a simpler interface:
>
> SchemaLoader { URL replaceSchemaLocation(URL location) }
>
> That would either return null if it cannot manage that schema, or a
> separate URL if it has
> a better source (such as classpath or local file system).
>
> 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
>
> ---
>
>
> --
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> ___
> GeoTools-Devel mailing list
> GeoTools-Devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
>
>


-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] [jira] (GEOT-4386) SchemaFactory getInstance methods very slow on some XSD used by Inspire

2013-02-05 Thread Mauro Bartolomeoli (JIRA)














































Mauro Bartolomeoli
 created  GEOT-4386


SchemaFactory getInstance methods very slow on some XSD used by Inspire















Issue Type:


Bug



Affects Versions:


9.0-beta1, 8.6, 10-beta



Assignee:


Unassigned


Components:


xml



Created:


05/Feb/13 9:01 AM



Description:


SchemaFactory getInstance tries to read and parse remote XSD files recursively when creating a new schema. In some situations this could be very slow due to remote servers lack of a timely response.
To speedup schema creation we should introduce alternative and pluggable schema loading mechanism, for example to use a local copy of frequently used schemas.




Fix Versions:


9.0-RC1, 8.7, 10-beta



Project:


GeoTools



Priority:


Minor



Reporter:


Mauro Bartolomeoli




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira





--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] [jira] (GEOT-4385) createElementHandler in ElementHandlerFactory fails for Elements without a Type

2013-02-05 Thread Mauro Bartolomeoli (JIRA)














































Mauro Bartolomeoli
 created  GEOT-4385


createElementHandler in ElementHandlerFactory fails for Elements without a Type















Issue Type:


Bug



Affects Versions:


9.0-beta1, 8.6, 10-beta



Assignee:


Unassigned


Components:


xml



Created:


05/Feb/13 8:55 AM



Description:


Elements coming from Inspire XSD, like MetadataURL do not have a valid type. 
Currently ElementHandlerFactory.createElementHandler fails with an exception in this situations, but for inspire schemas they should be simply ignored so that the Schema can be built anyway.




Fix Versions:


9.0-RC1, 8.7, 10-beta



Project:


GeoTools



Priority:


Minor



Reporter:


Mauro Bartolomeoli




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira





--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Problems with WMS client contacting an Inspire enabled GeoServer

2013-02-05 Thread Andrea Aime
On Tue, Feb 5, 2013 at 12:43 PM, Mauro Bartolomeoli <
mauro.bartolome...@geo-solutions.it> wrote:

> I have two options:
>  * simplest one: SchemaFactory looks in classpath for schemas.properties
> files containing uri -> localpath bindings used for preloading and caching
> schemas. The content of schema.properties would be similar to this one:
>
> http://www.w3.org/2001/xml.xsd=xml.xsd
>
>  * more extensible one: a new interface SchemaLoader could be introduced.
> to delegate schema loading; the interface will have two methods:
>   - boolean canLoad(URL url)
>   - Schema loadSchema(URL url)
>SchemaLoader implementation will be looked up with the SPI method
> during startup and used to load schemas when needed.
>

Either option works for me, both are pluggable in some sense, the second is
more general in that it would allow building a Schema
out of non local classpath sources, but it's also more work for the
implementor as they have to also build the Schema.
Another option could be to have a simpler interface:

SchemaLoader { URL replaceSchemaLocation(URL location) }

That would either return null if it cannot manage that schema, or a
separate URL if it has
a better source (such as classpath or local file system).

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

---
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


[Geotools-devel] Problems with WMS client contacting an Inspire enabled GeoServer

2013-02-05 Thread Mauro Bartolomeoli
Hi all,
I'm trying to solve a bug with the GeoTools WMS client, that when
contacting a GeoServer service with inspire extensions enabled, throws
exception and it's very slow to complete the GetCapabilities request.
This is very annoing because it prevents use of this type of services with
the GeoServer WMS cascading feature.

The first problem is easily solved, removing in
org.geotools.xml.handlers.ElementHandlerFactory the type check in
method createElementHandler:

public XMLElementHandler createElementHandler(Element eth)
throws SAXException {
Type type = eth.getType();

// REMOVE THIS BLOCK TO PREVENT EXCEPTION WITH INSPIRE UNKNOWN
ELEMENTS
if (type == null) {
return new IgnoreHandler(eth);
//throw new SAXException("Type not found for " + eth.getName()
+ " ");
}

if (type instanceof SimpleType) {
return new SimpleElementHandler(eth);
}
if (type instanceof ComplexType) {
return new ComplexElementHandler(this, eth);
}


return new IgnoreHandler(eth);
}

The slowness instead is due to schema downloads from the w3c web site. To
solve this one too, I thought to add the option to load some schemas
locally in org.geotools.xml.SchemaFactory.
I thought of a configurable mechanism to add and use local schema files in
place of remote ones.
I have two options:
 * simplest one: SchemaFactory looks in classpath for schemas.properties
files containing uri -> localpath bindings used for preloading and caching
schemas. The content of schema.properties would be similar to this one:

http://www.w3.org/2001/xml.xsd=xml.xsd

 * more extensible one: a new interface SchemaLoader could be introduced.
to delegate schema loading; the interface will have two methods:
  - boolean canLoad(URL url)
  - Schema loadSchema(URL url)
   SchemaLoader implementation will be looked up with the SPI method during
startup and used to load schemas when needed.

Opinions?

Thanks.

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Dott. Mauro Bartolomeoli
@mauro_bart
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

---
--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel


Re: [Geotools-devel] Proposal Replace Contribution Agreement

2013-02-05 Thread Jody Garnett
I would prefer not to mess with it if we don't have to (part of our motivation 
in looking at this is to provide something that is clear cut so legal 
departments do not need to think).  

If I word that more strongly we would need to talk to a legal rep at free 
software foundation to find you a better word.  

We are trying to do this on the cheap :D  

--  
Jody Garnett


On Tuesday, 5 February 2013 at 3:02 PM, Ben Caradoc-Davies wrote:

> That is interesting, Jody. I am not opposed to formalising the role of  
> representatives, just observing that we have not done so thus far. It  
> might well be a good idea.
>  
> Perhaps we can broaden the language to "representative" (but this has  
> legal connotations), or even just "person", together with capturing  
> their relationship with the rights owner?
>  
> Kind regards,
> Ben.
>  
> On 05/02/13 11:13, Jody Garnett wrote:
> > Thanks Ben, for reference I have been going through the eclipse stuff and …
> > a) It also demands employers sign for each representative they have in
> > the mix
> > b) It is very clear (when you sign up) that you can reference an
> > employer, or the organisations you are doing the work for as a contractor
> >  
>  
>  
> --  
> Ben Caradoc-Davies  (mailto:ben.caradoc-dav...@csiro.au)>
> Software Engineer
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>  
>  


--
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb___
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel