Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Re: IGeoResource / IGeoResource clarification / discussion

On Thu, 2005-01-13 at 19:09, Jody Garnett wrote:
> Hi David:
> 
> I have tightened up some of the javadocs for IGeoResource and 
> IGeoResourceInfo.
> I needed more definition/guidence of what methods I can call and expect 
> to block.
> 
> These IGeoResource methods are considered ui safe:
> - getIdentifier()
> - getService()
> - equals() & hashCode()
> - getStatus() & getStatusMessage()

mmm, this isn't always posible/advisable. It is entirely posible to have
a resource without an associated Service until it is required to be
resolved. That said ... a placeholder could be created and returned.

> 
> This IGeoResourceInfo method:
> - getType()
> 
> And these are considered blocking:
> - getInfo()
> - findResource()
> - all other IGeoResourceInfo methods
Can force a load when the info is loaded ... most cases would do this
anyways.
> 
> The plan is that a LabelProvider needs getIdentifier() and getType() to 
> produce a generic label and icon. ....  unfortantly the API is currently 
> in conflict -
> 
> Recomendation/Discussion:
> - make getInfo() throw an IOException (so it is *really* obvious I/O is 
> happening
Sure, this would change the current assumption though that the info is
loaded at this time.
> - move getType() to IGeoResource, we will need to remove the constant 
> WRITE as it the only ability we would be "know" simply from the identifier.

The move is fine, but unsure as to the WRITE constant.

> - add IGeoResourceInfo.isWritable() - allow blocking checks (ie that a 
> file is unlocked, and that our user has permission).
> 
> Consider/Discussion:
> You may also want to look at the IResource link bellow:
> - it has a getWorkspace() indicating that a getCatalog() method may be 
> useful (allow client code the ability to know where to listen for event 
> notification).
Yes and No, I currently magically move the IService around ...
> - getName() defined to be last section of the Path, we can define 
> getName() to be the name of the getIdentifierURL()
in most cases it's the reference of the url.

> - contains the idea of Phantom resources (ie pending), a similar idea 
> may be useful for search results that we are not connected to yet.
> - has both session properties, and persistent properties (w/ 2k limit)
Dont like this ... the represent the service/resource ... don't want
then to hold people's state too.
> 
> Links:
> http://svn.geotools.org/udig/trunk/plugins/net.refractions.udig.catalog/src/net/refractions/udig/catalog/IGeoResource.java
> http://svn.geotools.org/udig/trunk/plugins/net.refractions.udig.catalog/src/net/refractions/udig/catalog/IGeoResourceInfo.java
> http://www.eclipse.org/documentation/html/plugins/org.eclipse.platform.doc.isv/doc/reference/api/org/eclipse/core/resources/IResource.html



Back to the top