Class NFEConnectionDescriptor<U,V>
- java.lang.Object
-
- oracle.spatial.network.nfe.model.edit.NFEConnectionDescriptor<U,V>
-
- Type Parameters:
U
- The type of vertexV
- The type of the edges
public class NFEConnectionDescriptor<U,V> extends java.lang.Object
Holds a vertex a collections of edges to be connected to the point. Each edge is wrapped as an NFEConnectableEdge instance which contains the location where the edge must be connected. Additionally it contains the line point and line line rules which allow such connections.
-
-
Constructor Summary
Constructors Constructor Description NFEConnectionDescriptor()
Allocates a new connection descriptor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConnectableEdge(NFEConnectableEdge<V> connEdge)
Sets a collection of edges to be connected to a vertexvoid
addConnectableEdges(java.util.Collection<NFEConnectableEdge<V>> connEdges)
Adds a connectable edgejava.util.List<NFEConnectableEdge<V>>
getConnectableEdges()
Gets a collection of edges to be connected to a vertexU
getConnectableVertex()
Gets the vertex instance to be connectedlong
getConnectingLineLineRuleId()
Gets the line line rule ID which allows the connections describedlong
getConnectingLinePointRuleId()
Gets the line point rule ID which allows the connections describedjava.awt.geom.Point2D
getConnectionSpatialPoint()
Gets the point in the space where the connecting vertex will be placed after the connection is performeddouble
getTolerance()
Gets the tolerance that was used to determine the interaction between the elements in the connection descriptorboolean
removeConnectableEdge(NFEConnectableEdge<V> connEdge)
Removes an edge from the connectable edgesboolean
removeConnectableEdges(java.util.Collection<NFEConnectableEdge<V>> connEdges)
Removes a group of edges from the connectable edgesvoid
setConnectableVertex(U vertexElement)
Sets the vertex instance to be connectedvoid
setConnectingLineLineRuleId(long connLLRuleId)
Sets the line line rule ID which allows the connections describedvoid
setConnectingLinePointRuleId(long connLPRuleId)
Sets the line point rule ID which allows the connections describedvoid
setConnectionSpatilPoint(java.awt.geom.Point2D point)
Sets the point in the space where the connecting vertex will be placed after the connection is performed.void
setTolerance(double tolerance)
Sets the tolerance that was used to determine the interaction between the elements in the connection descriptor
-
-
-
Method Detail
-
getConnectionSpatialPoint
public java.awt.geom.Point2D getConnectionSpatialPoint()
Gets the point in the space where the connecting vertex will be placed after the connection is performed- Returns:
- a java point
-
setConnectionSpatilPoint
public void setConnectionSpatilPoint(java.awt.geom.Point2D point)
Sets the point in the space where the connecting vertex will be placed after the connection is performed. If this is not specified, the vertex' spatial point will be used.- Parameters:
point
- a java point
-
getTolerance
public double getTolerance()
Gets the tolerance that was used to determine the interaction between the elements in the connection descriptor- Returns:
- a tolerance value
-
setTolerance
public void setTolerance(double tolerance)
Sets the tolerance that was used to determine the interaction between the elements in the connection descriptor- Parameters:
tolerance
- a tolerance value, higher or equal to zero
-
getConnectableVertex
public U getConnectableVertex()
Gets the vertex instance to be connected- Returns:
- an instance of the class specified to represent a vertex. It may be a point feature element or a node
-
setConnectableVertex
public void setConnectableVertex(U vertexElement)
Sets the vertex instance to be connected- Parameters:
vertexElement
- an instance of the class specified to represent a vertex. It may be a point feature element or a node
-
getConnectableEdges
public java.util.List<NFEConnectableEdge<V>> getConnectableEdges()
Gets a collection of edges to be connected to a vertex- Returns:
- a collection of instances representing edges such as line feature elements o links
-
addConnectableEdge
public void addConnectableEdge(NFEConnectableEdge<V> connEdge)
Sets a collection of edges to be connected to a vertex- Parameters:
connEdge
- a collection of instances representing edges such as line feature elements o links
-
removeConnectableEdge
public boolean removeConnectableEdge(NFEConnectableEdge<V> connEdge)
Removes an edge from the connectable edges- Parameters:
connEdge
- a connectable edge to be removed- Returns:
- true if the edge was removed
-
removeConnectableEdges
public boolean removeConnectableEdges(java.util.Collection<NFEConnectableEdge<V>> connEdges)
Removes a group of edges from the connectable edges- Parameters:
connEdges
- a collection of connectable edges to be removed- Returns:
- true if all the edges were removed
-
addConnectableEdges
public void addConnectableEdges(java.util.Collection<NFEConnectableEdge<V>> connEdges)
Adds a connectable edge- Parameters:
connEdges
- an edge instance
-
setConnectingLinePointRuleId
public void setConnectingLinePointRuleId(long connLPRuleId)
Sets the line point rule ID which allows the connections described- Parameters:
connLPRuleId
- a line point rule ID
-
getConnectingLinePointRuleId
public long getConnectingLinePointRuleId()
Gets the line point rule ID which allows the connections described- Returns:
- a line point rule ID
-
setConnectingLineLineRuleId
public void setConnectingLineLineRuleId(long connLLRuleId)
Sets the line line rule ID which allows the connections described- Parameters:
connLLRuleId
- a line line rule ID
-
getConnectingLineLineRuleId
public long getConnectingLineLineRuleId()
Gets the line line rule ID which allows the connections described- Returns:
- a line line rule ID
-
-