Skip to main content

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

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()

This IGeoResourceInfo method:
- getType()

And these are considered blocking:
- getInfo()
- findResource()
- all other IGeoResourceInfo methods

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 - 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. - 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). - getName() defined to be last section of the Path, we can define getName() to be the name of the getIdentifierURL() - 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)

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