public class NFEConnectionManager
extends java.lang.Object
| Constructor and Description |
|---|
NFEConnectionManager(NFEModel model)
Allocates a new connection manager instance for the given model.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,NFEFeatureElement> |
connect(NFEConnectionDescriptor<NFEFeatureElement,NFEFeatureElement> connDesc)
Perform the connections described by the given connection descriptor instance.
|
NFEFeatureElement |
connect(NFEFeatureElement pointFeatElem, NFEConnectableEdge<NFEFeatureElement> connEdge, double tolerance)
Connects a point feature element to a line feature element.
|
boolean |
connectionExists(NFEFeatureElement featElem1, NFEFeatureElement featElem2)
Tells whether two feature elements are directly connected.
|
boolean |
disconnect(NFEFeatureElement targetFeatElem, java.util.Collection<NFEFeatureElement> connFeatElems, boolean merge)
Disconnects one or more feature elements from the target feature element.
|
boolean |
disconnect(NFEFeatureElement featElem1, NFEFeatureElement featElem2, boolean merge)
Disconnects two connected feature elements.
|
java.util.Collection<NFEFeatureElement> |
getConnectedElements(NFEFeatureElement featElem)
Gets all the feature elements adjacent to the given feature element.
|
int |
getInConnectionCount(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
Gets the count of the incoming connected lines with the specified feature layer and feature class.
|
int |
getInConnectionsCount(NFEFeatureElement pointFeatElem)
Gets the incoming connected lines count
|
int |
getOutConnectionCount(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
Gets the count of the outgoing connected lines with the specified feature layer and feature class.
|
int |
getOutConnectionsCount(NFEFeatureElement pointFeatElem)
Gets the outgoing connected lines count
|
boolean |
inConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
Tells whether the line feature element is an incoming line connected to the point feature element
|
boolean |
isDanglingNode(NFENode node)
Tells whether a node is a dangling node, that is, there are no feature elements over the node nor is connected to any link
|
NFEFeatureElement |
merge(NFEFeatureElement lineFeatElem1, NFEFeatureElement lineFeatElem2)
Merges two line feature elements into one single line feature element.
|
boolean |
outConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
Tells whether the line feature element is an outgoing line connected to the point feature element
|
public NFEConnectionManager(NFEModel model)
model - an nfe model instancepublic java.util.Map<java.lang.String,NFEFeatureElement> connect(NFEConnectionDescriptor<NFEFeatureElement,NFEFeatureElement> connDesc)
connDesc - the connection descriptorpublic NFEFeatureElement connect(NFEFeatureElement pointFeatElem, NFEConnectableEdge<NFEFeatureElement> connEdge, double tolerance)
pointFeatElem - a point feature element to be connectedconnEdge - a connectable edge instance containing the line feature element and how the line must be connectedtolerance - tolerance used to determine the line connection locationpublic boolean isDanglingNode(NFENode node)
node - a node instancepublic boolean connectionExists(NFEFeatureElement featElem1, NFEFeatureElement featElem2)
featElem1 - a line or point feature elementfeatElem2 - a line or point feature elementpublic boolean inConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
pointFeatElem - a point feature elementlineFeatElem - a line feature elementpublic boolean outConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
pointFeatElem - a point feature elementlineFeatElem - a line feature elementpublic java.util.Collection<NFEFeatureElement> getConnectedElements(NFEFeatureElement featElem)
featElem - a line or point feature elementpublic int getInConnectionsCount(NFEFeatureElement pointFeatElem)
pointFeatElem - a point feature elementpublic int getOutConnectionsCount(NFEFeatureElement pointFeatElem)
pointFeatElem - a point feature elementpublic int getInConnectionCount(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
pointFeatElem - a point feature elementlineFeatLayerId - the feature layer ID of the incoming lines.lineFeatClassId - the feature class ID of the incoming lines.public int getOutConnectionCount(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
pointFeatElem - a point feature elementlineFeatLayerId - the feature layer ID of the incoming lines.lineFeatClassId - the feature class ID of the incoming lines.public boolean disconnect(NFEFeatureElement targetFeatElem, java.util.Collection<NFEFeatureElement> connFeatElems, boolean merge)
targetFeatElem - a feature element connected to the feature elements of the collection parameterconnFeatElems - a collection of feature elements to be disconnected from the target feature elementmerge - whether split line feature elements must be merged once disconnected.public boolean disconnect(NFEFeatureElement featElem1, NFEFeatureElement featElem2, boolean merge)
featElem1 - a line or point feature elementfeatElem2 - a line or point feature elementwhether - split line feature elements must be merged once disconnected.public NFEFeatureElement merge(NFEFeatureElement lineFeatElem1, NFEFeatureElement lineFeatElem2)
lineFeatElem1 - a line feature elementlineFeatElem2 - a line feature element. If merge is performed, this line is disposed