01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2002-2006, GeoTools Project Managment Committee (PMC)
05: * (C) 2002, Refractions Reserach Inc.
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation;
10: * version 2.1 of the License.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.graph.build.basic;
18:
19: /**
20: * An implementation of GraphGenerator used to generate directed graphs.
21: * Graphs are generated as follows:<BR>
22: * <UL>
23: * <LI>Objects added to the generator are 2 element object arrays.</LI>
24: * <LI>The elements of the array represent the objects modelled by the nodes.
25: * <LI>The object array itself is the object modelled by the edges.
26: * <LI>As each object array is added to the generator:
27: * <UL>
28: * <LI>A node lookup table is queried using the elements of the object array.
29: * <LI>If a node lookup returns null, a new node is created for its respective
30: * object.
31: * <LI>A new edge is created incident to the two looked up nodes.
32: * <LI>The underlying object of the edge is set to the be object array.
33: * </UL>
34: * </UL>
35: *
36: * @author Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
37: *
38: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/extension/graph/src/main/java/org/geotools/graph/build/basic/BasicDirectedGraphGenerator.java $
39: */
40: public class BasicDirectedGraphGenerator extends BasicGraphGenerator {
41:
42: /**
43: * Constructs a new generator.
44: */
45: public BasicDirectedGraphGenerator() {
46: super ();
47: setGraphBuilder(new BasicDirectedGraphBuilder());
48: }
49: }
|