Java Doc for Graph.java in  » GIS » GeoTools-2.4.1 » org » geotools » graph » structure » 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 » GeoTools 2.4.1 » org.geotools.graph.structure 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.graph.structure.Graph

All known Subclasses:   org.geotools.graph.structure.basic.BasicGraph,
Graph
public interface Graph (Code)
Represents a graph. A graph is a collection of nodes (verticies) connected by links called edges (arcs).

In most applications nodes of a graph represent the objects being modelled, and the edges represent the relationships between the objects. An example could be a polygon coverage in which one wishes to model a boundary sharing relationship. The following is an illustration.



In the above figure, the objects (nodes) are the polygons themselves, and the relationship (edges) between them is boundary sharing.

However, there exists types of graphs in which the roles are reversed and the edges are the objects, and the nodes are the relationships. An example of such a graph is the stream network shown below.



In the above figure, the objects (edges) are the stream segments and the relationship (nodes) between them is endpoint sharing. However, if desirable one could model the second case similar to the first. The resulting graph is shown below.



The Graph object is intended to serve as a container for a collection of nodes and edges. It does dont define or manage the relationship among the components it contains.
See Also:   Node
See Also:   Edge
author:
   Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net


Field Summary
final public static  intFAIL_QUERY
     Signal to indicate that a graph component does NOT meet the requirements of a query made against the graph.
final public static  intPASS_AND_CONTINUE
     Signal to indicate that a graph component meets the requirements of a query against a graph and that the query should continue.
final public static  intPASS_AND_STOP
     Signal to indicate that a graph component meets the requirements of a query against a graph and that the query should end.


Method Summary
public  CollectiongetEdges()
     Returns the edges of the graph.
public  CollectiongetNodes()
     Returns the nodes of the graph.
public  ListgetNodesOfDegree(int n)
     Returns all the nodes in the graph of a specified degree.
public  ListgetVisitedEdges(boolean visited)
     Returns all the edges in the graph that have been marked as visited or non-visited.
Parameters:
  visited - True if edge is visited, false if edge is unvisited.
public  ListgetVisitedNodes(boolean visited)
     Returns all the nodes in the graph that have been marked as visited or non-visited.
Parameters:
  visited - True if node is visited, false if node is unvisited.
public  ListqueryEdges(GraphVisitor visitor)
     Performs a query against the edges of the graph.
public  ListqueryNodes(GraphVisitor visitor)
     Performs a query against the nodes of the graph.
public  voidvisitEdges(GraphVisitor visitor)
     Applies the visitor pattern to the edges of the graph.
public  voidvisitNodes(GraphVisitor visitor)
     Applies the visitor pattern to the nodes of the graph.

Field Detail
FAIL_QUERY
final public static int FAIL_QUERY(Code)
Signal to indicate that a graph component does NOT meet the requirements of a query made against the graph.



PASS_AND_CONTINUE
final public static int PASS_AND_CONTINUE(Code)
Signal to indicate that a graph component meets the requirements of a query against a graph and that the query should continue.



PASS_AND_STOP
final public static int PASS_AND_STOP(Code)
Signal to indicate that a graph component meets the requirements of a query against a graph and that the query should end.





Method Detail
getEdges
public Collection getEdges()(Code)
Returns the edges of the graph. A collection of Edge objects.
See Also:   Edge



getNodes
public Collection getNodes()(Code)
Returns the nodes of the graph. A collection of Node objects.
See Also:   Node



getNodesOfDegree
public List getNodesOfDegree(int n)(Code)
Returns all the nodes in the graph of a specified degree. The degree of a node is the number of edges that are adjacent to the node.
Parameters:
  n - The desired degree of nodes to be returned. A collection of nodes of degree n.
See Also:   Node.getDegree



getVisitedEdges
public List getVisitedEdges(boolean visited)(Code)
Returns all the edges in the graph that have been marked as visited or non-visited.
Parameters:
  visited - True if edge is visited, false if edge is unvisited. List of edges marked as visited / non-visited.
See Also:   Graphable.isVisited



getVisitedNodes
public List getVisitedNodes(boolean visited)(Code)
Returns all the nodes in the graph that have been marked as visited or non-visited.
Parameters:
  visited - True if node is visited, false if node is unvisited. List of nodes marked as visited / non-visited.
See Also:   Graphable.isVisited



queryEdges
public List queryEdges(GraphVisitor visitor)(Code)
Performs a query against the edges of the graph. Each Edge object contained in the graph is passed to a GraphVisitor to determine if it meets the query criteria.
Parameters:
  visitor - Determines if the meets the query criteria.
Returns MEET_AND_CONTINUE to signal that the edge meets the query criteria and the query should continue.
Returns MEET_AND_STOP to signal that the edge meest the query criteria andthe query should stop.
FAIL_QUERY to signal that the edge does NOT meet the query criteria. A collection of edges that meet the query criteria.
See Also:   Edge
See Also:   GraphVisitor



queryNodes
public List queryNodes(GraphVisitor visitor)(Code)
Performs a query against the nodes of the graph. Each Node object contained in the graph is passed to a GraphVisitor to determine if it meets the query criteria.
Parameters:
  visitor - Determines if node meets query criteria. Returns MEET_AND_CONTINUE to signal that the node meets the query criteria and the query should continue.
Returns MEET_AND_STOP to signal that the node meest the query criteria andthe query should stop.
FAIL_QUERY to signal that the node does NOT meet the query criteria. A collection of nodes that meet the query criteria.
See Also:   Node
See Also:   GraphVisitor



visitEdges
public void visitEdges(GraphVisitor visitor)(Code)
Applies the visitor pattern to the edges of the graph.
Parameters:
  visitor -



visitNodes
public void visitNodes(GraphVisitor visitor)(Code)
Applies the visitor pattern to the nodes of the graph.
Parameters:
  visitor -



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