Java Doc for ILayer.java in  » GIS » udig-1.1 » net » refractions » udig » project » 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.project 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


net.refractions.udig.project.ILayer

ILayer
public interface ILayer extends Comparable<ILayer>(Code)
TODO Purpose of net.refractions.udig.project


author:
   Jesse
since:
   1.0.0


Field Summary
final public static  intDONE
    
final public static  intERROR
    
final public static  intMISSING
    
final public static  intUNCONFIGURED
    
final public static  CoordinateReferenceSystemUNKNOWN_CRS
     Indicates the crs that will be used if the layer does not declare a crs.
final public static  intWAIT
     WAIT layer is waiting for information.
final public static  intWARNING
     WARNING render process has produced warning(s) in the log.
final public static  intWORKING
     WORKING rendering process is underway.

Note the default Label decorator makes use of a WORKING_HINT layer property.



Method Summary
public  voidaddListener(ILayerListener listener)
     Listen to changes on this layer.
public  FiltercreateBBoxFilter(Envelope boundingBox, IProgressMonitor monitor)
     Creates A geometry filter for the layer.

getMap().getViewportModel() will return the ViewportModel.


See Also:   net.refractions.udig.project.render.IViewportModel
Parameters:
  boundingBox - in the same crs as the viewport model.
 IGeoResourcefindGeoResource(Class<T> clazz)
     Locate the first IGeoResource that canResolve the provided resource type.

Example implementation:


 for( IGeoResource resource : getGeoResources() ) {
 if (resource.canResolve(FeatureSource.class)) {
 return resource;
 }
 }
 return null;
 


Parameters:
  clazz - class of the resource that the IGeoResource claims it can adapt to.
 IBlackboardgetBlackboard()
     Temporary layer properties, used for lightweight collaboration.
 ReferencedEnvelopegetBounds(IProgressMonitor monitor, CoordinateReferenceSystem crs)
     Returns the bounds of the layer as best estimated.
 CoordinateReferenceSystemgetCRS(IProgressMonitor monitor)
     Gets the CRS for the layer.
 CoordinateReferenceSystemgetCRS()
     Gets the CRS for the layer.
 FiltergetFilter()
     Filter indicating the selected features.

In order for this value to be useful the layer should be selectable, often a single fid filter during user edit opperations.

Note: Filter.ALL indicates no selected Features.

public  IGeoResourcegetGeoResource()
     Resource the user associates with this layer.
public  IGeoResourcegetGeoResource(Class<T> clazz)
     Returns the first found geoResource that can resolve to clazz.
Parameters:
  clazz - the clazz that the returned georesource can resolve to.
public  List<IGeoResource>getGeoResources()
     Access to resources that hold data for this layer.
public  ImageDescriptorgetGlyph()
     ImageDescriptor for this Layer.
public  URLgetID()
    
public  IMapgetMap()
     The Map that "owns" or "contains" the current layer.
public  StringgetName()
     Gets the name from the associated metadata.
 IBlackboardgetProperties()
     Temporary layer properties, used for lightweight collaboration.
public  QuerygetQuery(boolean selection)
     Query that selects all the features for the layer.

The selected flag is used with respect to getFilter() :

  • false : Query for layers contents
  • true : Query for the layer's selected features

Convenience method


Parameters:
  layer - The layer the Query is associated with.
Parameters:
  selection - true will return a query for the selected features.
public  EgetResource(Class<E> resourceType, IProgressMonitor monitor)
     Returns a real resource that one of the GeoResources can resolved to.

Note: examples of resources are: FeatureSource, WebMapServer, etc...

public  FeatureTypegetSchema()
     Retrieve a schema description of this Layer.

This schema can be used to determine the available attributes for use in Style Rule construction.

public  intgetStatus()
     Indication of Layer status.
public  StringgetStatusMessage()
     A message to provide the user with additional feed back about the current rendering status.
public  IStyleBlackboardgetStyleBlackboard()
     StyleBlackboard used for collaboration with the rendering process.
public  intgetZorder()
     Returns the ZOrder of the Layer.
public  booleanhasResource(Class<T> resourceType)
     Check if a IGeoResource exists that canResolve to the provided resource type.

Example:


 if (layer.hasResource(FeatureSource.class)) {
 return handle.getResource(FeatureSource.class, monitor);
 }
 

The blocking method allow the object to be obtained.
Parameters:
  resourceType - the type of resource calleer is interested in.
public  booleanisApplicable(String toolCategoryId)
     Check toolset applicability.

Note: some layers may not ever be applicable for certaint toolsets.

public  booleanisType(Class<T> resourceType)
    
public  booleanisVisible()
    
 MathTransformlayerToMapTransform()
     Returns the Mathtransform from this layers CRS to the map's CRS (modelled as part of the viewport model).
 MathTransformmapToLayerTransform()
     Returns the Mathtransform from the map's CRS (modeled as part of the viewport model) to this layers CRS .
 voidrefresh(Envelope bounds)
     Triggers the layer to rerender if it is currently displayed.
public  voidremoveListener(ILayerListener listener)
    
public  voidsetStatus(int status)
     Sets the current status of the Layer.
Parameters:
  status - the status.
public  voidsetStatusMessage(String string)
    

Field Detail
DONE
final public static int DONE(Code)
DONE rendering process completed normally



ERROR
final public static int ERROR(Code)
ERROR render process was unable to complete normally



MISSING
final public static int MISSING(Code)
MISSING cannot locate a GeoResource for this layer



UNCONFIGURED
final public static int UNCONFIGURED(Code)
UNCONFIGURED associated GeoResource is unconfigured, or is unavailable



UNKNOWN_CRS
final public static CoordinateReferenceSystem UNKNOWN_CRS(Code)
Indicates the crs that will be used if the layer does not declare a crs. This crs is wgs84 crs with the name: Messages.LayerImpl_unknown (unkown in english)



WAIT
final public static int WAIT(Code)
WAIT layer is waiting for information.



WARNING
final public static int WARNING(Code)
WARNING render process has produced warning(s) in the log.



WORKING
final public static int WORKING(Code)
WORKING rendering process is underway.

Note the default Label decorator makes use of a WORKING_HINT layer property. The rendering process will clear this HINT when starting work, subsequence calls to setState( WORKING ) will cycle the to update the clock.






Method Detail
addListener
public void addListener(ILayerListener listener)(Code)
Listen to changes on this layer. Each listener can only be added once



createBBoxFilter
public Filter createBBoxFilter(Envelope boundingBox, IProgressMonitor monitor)(Code)
Creates A geometry filter for the layer.

getMap().getViewportModel() will return the ViewportModel.


See Also:   net.refractions.udig.project.render.IViewportModel
Parameters:
  boundingBox - in the same crs as the viewport model. a Geometry filter in the correct CRS or null if an exception occurs.



findGeoResource
IGeoResource findGeoResource(Class<T> clazz)(Code)
Locate the first IGeoResource that canResolve the provided resource type.

Example implementation:


 for( IGeoResource resource : getGeoResources() ) {
 if (resource.canResolve(FeatureSource.class)) {
 return resource;
 }
 }
 return null;
 


Parameters:
  clazz - class of the resource that the IGeoResource claims it can adapt to. true if a IGeoResource exists that canResolve to resourceType.



getBlackboard
IBlackboard getBlackboard()(Code)
Temporary layer properties, used for lightweight collaboration.

Note these values are not persisted, this can act as a blackboard for plugin collabaration. These properties are not saved and are reset when a map is opened.

If you need long term collaboration we can set up a persistent blackboard in the same manner as IMap.getBlackboard .

Note: Please don't use this to work around limitations of our object model, instead send email and we can set up a long term solution.

Blackboard used for lightweight collaboration.



getBounds
ReferencedEnvelope getBounds(IProgressMonitor monitor, CoordinateReferenceSystem crs) throws IOException(Code)
Returns the bounds of the layer as best estimated. The bounds will be reprojected into the crs provided. If the crs parameter is null then the native envelope will be returned. If the native projection is not known or if a transformation is not possible then the native envelope will be returned.. This method may be blocking.
Parameters:
  monitor -
Parameters:
  crs - the desired CRS for the returned envelope. the envelope of the layer. If the native crs is not known or if a transformation isnot possible then the untransformed envelope will be returned.



getCRS
CoordinateReferenceSystem getCRS(IProgressMonitor monitor)(Code)
Gets the CRS for the layer. NOTE: THIS METHOD MAY BLOCK!!!
Parameters:
  monitor - may be null. the CoordinateReferenceSystem of the layer or if the CRS cannot be determined. thecurrent map's CRS will be returned, or if this fails the CRS will be WGS84.



getCRS
CoordinateReferenceSystem getCRS()(Code)
Gets the CRS for the layer. NOTE: THIS METHOD MAY BLOCK!!! the CoordinateReferenceSystem of the layer or if the CRS cannot be determined. thecurrent map's CRS will be returned, or if this fails the CRS will be WGS84.



getFilter
Filter getFilter()(Code)
Filter indicating the selected features.

In order for this value to be useful the layer should be selectable, often a single fid filter during user edit opperations.

Note: Filter.ALL indicates no selected Features. (All features are filtered out)

A tool may wish to record the previous Filter, before replacing (or adding to) this value.

Will never return null. Filter indicating the selected features. Filter.ALL indicates no selected Features.



getGeoResource
public IGeoResource getGeoResource()(Code)
Resource the user associates with this layer. This is not the same as getGeoResource(Class clazz). Resource the user associates with this layer.



getGeoResource
public IGeoResource getGeoResource(Class<T> clazz)(Code)
Returns the first found geoResource that can resolve to clazz.
Parameters:
  clazz - the clazz that the returned georesource can resolve to. the first found geoResource that can resolve to clazz.



getGeoResources
public List<IGeoResource> getGeoResources()(Code)
Access to resources that hold data for this layer. IGeoResources that can used to obtain layer data



getGlyph
public ImageDescriptor getGlyph()(Code)
ImageDescriptor for this Layer.

Note we need to do the decorator exention on Layer to reflect status. Custom glyph - or null if none available.




getID
public URL getID()(Code)
Gets the unique id, unique within a context model the id of the layerRef



getMap
public IMap getMap()(Code)
The Map that "owns" or "contains" the current layer. the containing map.



getName
public String getName()(Code)
Gets the name from the associated metadata. the name from the associated metadata



getProperties
IBlackboard getProperties()(Code)
Temporary layer properties, used for lightweight collaboration.

Note these values are not persisted, this can act as a blackboard for plugin collabaration. These properties are not saved and are reset when a map is opened.

If you need long term collaboration we can set up a persistent blackboard in the same manner as StyleBlackbord.

Note: Please don't use this to work around limitations of our object model, instead send email and we can set up a long term solution.

Blackboard used for lightweight collaboration.



getQuery
public Query getQuery(boolean selection)(Code)
Query that selects all the features for the layer.

The selected flag is used with respect to getFilter() :

  • false : Query for layers contents
  • true : Query for the layer's selected features

Convenience method


Parameters:
  layer - The layer the Query is associated with.
Parameters:
  selection - true will return a query for the selected features. If selection if false then the features that are not selected are returned, otherwisea query that selects all the selected features is returned.



getResource
public E getResource(Class<E> resourceType, IProgressMonitor monitor) throws IOException(Code)
Returns a real resource that one of the GeoResources can resolved to.

Note: examples of resources are: FeatureSource, WebMapServer, etc... GeoResources are handles for real resources.

Example implementation:


 for( IGeoResource resource : getGeoResources() ) {
 if (resource.canResolve(FeatureSource.class)) {
 return resource;
 }
 }
 return null;
 

IMPORTANT: unlike using IGeoResource.resolve(ClassIProgressMonitor) ILayer.getResource(Class,IProgressMonitor) returns the same instance of the resource. The IGeoResource.resolve(ClassIProgressMonitor) method returns a new instance each time and therefore should NOT be used as a replacement for ILayer.getResource(Class,IProgressMonitor) .


Parameters:
  resourceType - true if a IGeoResource exists that canResolve to resourceType.



getSchema
public FeatureType getSchema()(Code)
Retrieve a schema description of this Layer.

This schema can be used to determine the available attributes for use in Style Rule construction. That is we will need to construct an "answer" for this query even if we just have a WMS layer.

This is similar to the following check:


 data = getResource();
 <b>return</b> data != null ? data.getSchema() : null;
 

Schema information if available, otherwise null.



getStatus
public int getStatus()(Code)
Indication of Layer status.

This is used to provide feedback for a Layers rendering status.

Future versions will return an enum.



getStatusMessage
public String getStatusMessage()(Code)
A message to provide the user with additional feed back about the current rendering status.

This is used to provide feedback for a Layers rendering status.

message to provide the user with additional feed back about the current renderingstatus.



getStyleBlackboard
public IStyleBlackboard getStyleBlackboard()(Code)
StyleBlackboard used for collaboration with the rendering process.

This Blackboard is persisted, any modications made to the blackboard will result refresh of the effected layers.

Blackboard used for renderer collaboration.




getZorder
public int getZorder()(Code)
Returns the ZOrder of the Layer. The Z-Order dictates the order in which the Layer is rendered Low z-orders are rendered first and higher z-orders are rendered on top. the ZOrder of the Layer.



hasResource
public boolean hasResource(Class<T> resourceType)(Code)
Check if a IGeoResource exists that canResolve to the provided resource type.

Example:


 if (layer.hasResource(FeatureSource.class)) {
 return handle.getResource(FeatureSource.class, monitor);
 }
 

The blocking method allow the object to be obtained.
Parameters:
  resourceType - the type of resource calleer is interested in. true if a IGeoResource exists that canResolve to resourceType.



isApplicable
public boolean isApplicable(String toolCategoryId)(Code)
Check toolset applicability.

Note: some layers may not ever be applicable for certaint toolsets. Sometimes this is can be determined quickly from a layer property like "selectable" for the selection toolset. Other toolsets may need to perform a more detailed examination.


See Also:   isSelectable
Parameters:
  toolCategoryId -



isType
public boolean isType(Class<T> resourceType)(Code)

See Also:   ILayer.hasResource(Class)ILayer.hasResource(Class)



isVisible
public boolean isVisible()(Code)
Returns whether this layer is currently visible whether this layer is currently visible



layerToMapTransform
MathTransform layerToMapTransform() throws IOException(Code)
Returns the Mathtransform from this layers CRS to the map's CRS (modelled as part of the viewport model).

getMap().getViewportModel() will return the ViewportModel.


See Also:   net.refractions.udig.project.render.IViewportModel



mapToLayerTransform
MathTransform mapToLayerTransform() throws IOException(Code)
Returns the Mathtransform from the map's CRS (modeled as part of the viewport model) to this layers CRS .

getMap().getViewportModel() will return the ViewportModel.


See Also:   net.refractions.udig.project.render.IViewportModel



refresh
void refresh(Envelope bounds)(Code)
Triggers the layer to rerender if it is currently displayed.
Parameters:
  bounds - The area to render or the entire viewport if null.



removeListener
public void removeListener(ILayerListener listener)(Code)
remove LayerListener



setStatus
public void setStatus(int status)(Code)
Sets the current status of the Layer.
Parameters:
  status - the status. Will be an enum in the future but current EMF implementationprevents this.



setStatusMessage
public void setStatusMessage(String string)(Code)
Sets the current status message
Parameters:
  message - the status message



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