package org.n52.v3d.worldviz.featurenet;

import org.n52.v3d.triturus.vgis.VgFeature;

/**
 * A VgFlow describes a directed, weighted relation between two geo-objects.
 * 
 * @author Benno Schmidt
 *
 */
public class VgFlow implements VgRelation {
	
	private VgFeature from, to;
	private double flowRate;

	public VgFlow(VgFeature from, VgFeature to, double flowRate) {
		this.from = from;
		this.to = to;
	}

	public void setFrom(VgFeature from) {
		this.from = from;
	}

	public void setTo(VgFeature to) {
		this.to = to;
	}

	public VgFeature getFrom() {
		return from;
	}

	public VgFeature getTo() {
		return to;
	}

	public boolean isDirected() {
		return true;
	}
		 
	public Object getValue() {
		return new Double(this.flowRate);
	}
}

@@ -168,11 +168,24 @@
 ects
+ (%22features%22)
 .%0D%0A
-
  * %0D
@@ -215,12 +215,8 @@
 dt%0D%0A
- *%0D%0A
  */%0D
@@ -418,32 +418,61 @@
 %09this.to = to;%0D%0A
+%09%09this.flowRate = flowRate;%0D%0A
 %09%7D%0D%0A%0D%0A%09public vo
@@ -771,24 +771,24 @@
 tValue() %7B%0D%0A
-
 %09%09return new
@@ -816,11 +816,145 @@
 );%0D%0A%09%7D%0D%0A
+%09%0D%0A%09public String toString() %7B%0D%0A%09%09return %22%5B%22 +%0D%0A%09%09%09%09this.from + %22 -%3E %22 + this.to + %22, flow rate = %22 + this.flowRate + %22%5D%22;%0D%0A%09%09%09%09%0D%0A%09%7D%0D%0A
 %7D%0D%0A

Update VgFlow.java