Java Doc for IGeoResource.java in  » GIS » udig-1.1 » net » refractions » udig » catalog » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » udig 1.1 » net.refractions.udig.catalog 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   net.refractions.udig.catalog.IGeoResource

All known Subclasses:   net.refractions.udig.catalog.internal.shp.ShpGeoResourceImpl,  net.refractions.udig.catalog.memory.internal.MemoryGeoResourceImpl,  net.refractions.udig.mapgraphic.internal.MapGraphicResource,  net.refractions.udig.catalog.internal.postgis.PostGISGeoResource,  net.refractions.udig.catalog.internal.wfs.WFSGeoResourceImpl,  net.refractions.udig.project.internal.impl.NullGeoResource,  net.refractions.udig.project.internal.impl.LayerResource,  net.refractions.udig.catalog.internal.wms.WMSGeoResourceImpl,  net.refractions.udig.catalog.internal.db2.DB2GeoResource,  net.refractions.udig.catalog.internal.arcsde.ArcGeoResource,  net.refractions.udig.catalog.rasterings.AbstractRasterGeoResource,  net.refractions.udig.catalog.hsql.internal.HsqlGeoResource,  net.refractions.udig.catalog.internal.gml.GMLGeoResourceImpl,  net.refractions.udig.catalog.google.GoogleResource,  net.refractions.udig.catalog.internal.oracle.OracleGeoResource,
IGeoResource
abstract public class IGeoResource implements IResolve(Code)
Represents a handle to a spatial resource.

The resource is not guaranteed to exist, nor do we guarantee that we can connect with the resource. Some/All potions of this handle may be loaded as required. This resource handle may also be the result a metadata service query.

Implementing an IService

Implement the abstract methods and you are good to go.

Please consider implementing support for resolve( ImageDescriptor.class, null ) as it will allow your IGeoResource to show up with a unqiue representation in the catalog.


author:
   David Zwiers, Refractions Research
since:
   0.6




Method Summary
public  booleancanResolve(Class<T> adaptee)
     Harded coded to capture the IGeoResource contract.
public  voiddispose(IProgressMonitor monitor)
     Disposes of any resources or listeners required.
public  booleanequals(Object arg0)
    
abstract public  URLgetIdentifier()
    
abstract public  IGeoResourceInfogetInfo(IProgressMonitor monitor)
     Blocking operation to describe this service.
public  inthashCode()
    
public  List<IResolve>members(IProgressMonitor monitor)
     List of children, or EMPTY_LIST for a leaf.
public  IResolveparent(IProgressMonitor monitor)
     Returns parent for this GeoResource.
public  Tresolve(Class<T> adaptee, IProgressMonitor monitor)
     Blocking operation to resolve into the adaptee, if available.
abstract public  IServiceservice(IProgressMonitor monitor)
     Returns the IService for this GeoResource.
public  StringtoString()
     Indicate class and id.



Method Detail
canResolve
public boolean canResolve(Class<T> adaptee)(Code)
Harded coded to capture the IGeoResource contract.

That is we *must* resolve the following:

Required adaptions:

  • GeoResource.class - this
  • IGeoResourceInfo.class - getInfo (ie about this handles contents)
  • IService.class - service (ie that is responsible for this GeoResource)

Recommendated adaptions:

  • ImageDescriptor.class (for icon provided by external service)
  • List.class - members (ie children of this georesource as in the wms layer case)

Here is an implementation example (for something that can adapt to ImageDescriptor and FeatureSource):


 public <T> boolean canResolve( Class<T> adaptee ) {
 return adaptee != null
 && (adaptee.isAssignableFrom(ImageDescriptor.class)
 || adaptee.isAssignableFrom(FeatureSource.class) || super.canResolve(adaptee));
 }
 



dispose
public void dispose(IProgressMonitor monitor)(Code)
Disposes of any resources or listeners required. Default implementation does nothing.
Parameters:
  monitor - monitor to show progress



equals
public boolean equals(Object arg0)(Code)
This should represent the identifier
See Also:   Object.equals(java.lang.Object)
Parameters:
  arg0 -



getIdentifier
abstract public URL getIdentifier()(Code)
The identifier of a IGeoResource is identified by parent().getIdentifer()#ResourceID

For example: A WMS (IService) with an id of http://www.something.com/wms?Service=WMS would have georesources with ids similar to: http://www.something.com/wms?Service=WMS#layer1
See Also:   IResolve.getIdentifier




getInfo
abstract public IGeoResourceInfo getInfo(IProgressMonitor monitor) throws IOException(Code)
Blocking operation to describe this service.

As an example this method is used by LabelDecorators to acquire title, and icon.

IGeoResourceInfo resolve(IGeoResourceInfo.class,IProgressMonitor monitor);
See Also:   IGeoResource.resolve(ClassIProgressMonitor)



hashCode
public int hashCode()(Code)
This should represent the identified
See Also:   Object.hashCode



members
public List<IResolve> members(IProgressMonitor monitor)(Code)
List of children, or EMPTY_LIST for a leaf.

The provided implementation indicates that this IGeoResource is a leaf.

Collections.emptyList();
See Also:   net.refractions.udig.catalog.IResolve.members(org.eclipse.core.runtime.IProgressMonitor)



parent
public IResolve parent(IProgressMonitor monitor) throws IOException(Code)
Returns parent for this GeoResource.

Most implementations will use the following code example:


 public IService parent( IProgressMonitor monitor ) throws IOException {
 return service(monitor);
 }
 
This code example preserves backwords compatibility with uDig 1.0 via type narrowing IResolve to IService.

You will need to provide a different implementation when working with nested content (like database schema or wms layers). parent IResolve for this GeoResource
See Also:   IGeoResource.resolve(ClassIProgressMonitor)




resolve
public T resolve(Class<T> adaptee, IProgressMonitor monitor) throws IOException(Code)
Blocking operation to resolve into the adaptee, if available.

Required adaptions:

  • GeoResource.class - this
  • IGeoResourceInfo.class - getInfo( monitor ) ie about this handles contents
  • IService.class - service( monitor ) ie that is responsible for this GeoResource

Example Use (no casting required!):


 IGeoResourceInfo info = resolve(IGeoResourceInfo.class);
 

Recommendated adaptions:

  • ImageDescriptor.class (for icon provided by external service)
  • List.class - members( monitor ) ie children of this georesource as in the wms layer case


Parameters:
  adaptee -
Parameters:
  monitor - instance of adaptee, or null if unavailable (IGeoResourceInfo and IService must besupported)
See Also:   IGeoResourceInfo
See Also:   IService
See Also:   IResolve.resolve(ClassIProgressMonitor)



service
abstract public IService service(IProgressMonitor monitor) throws IOException(Code)
Returns the IService for this GeoResource.

Method is useful in dealing with deeply nested GeoResource children (where parent may not always be an IService). IService for this GeoResource
See Also:   IGeoResource.resolve(ClassIProgressMonitor)




toString
public String toString()(Code)
Indicate class and id. string representing this IResolve



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.