public class NFEMemoryRuleHandlerContext extends java.lang.Object implements NFERuleHandlerContext
| Constructor and Description |
|---|
NFEMemoryRuleHandlerContext(NFEModel model, NFEConnectivityRule rule) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
connectionExists(NFEFeatureElement featElem1, NFEFeatureElement featElem2)
Tells whether the given feature elements are connected.
|
NFEConnectableEdge<NFEFeatureElement> |
createConnectableEdge(NFEFeatureElement lineFeatElem, java.awt.geom.Point2D connPoint, IntersectionLocation connInterLoc)
Creates a new connectable edge which will be used by a connection descriptor.
|
NFEConnectionDescriptor<NFEFeatureElement,NFEFeatureElement> |
createConnectionDescriptor()
Creates a new connection descriptor instance
|
NFERuleHandlerContext |
createContext(NFELinePointRule lpRule)
Creates a new nested context for the line-point rule.
|
NFELinePointRuleHandlerParam |
createLeftHandLinePointHandlerParam(NFELineLineRuleHandlerParam llhParam)
Creates a new parameter for a line-line rule's left hand side line-point rule
|
NFELinePointRuleHandlerParam |
createRighttHandLinePointHandlerParam(NFELineLineRuleHandlerParam llhParam)
Creates a new parameter for a line-line rule's right hand side line-point rule
|
int[] |
getAvailableConnections(NFEFeatureElement pointFeatElem)
Gets the number of available connections for the given point feature element.
|
NFERuleHandler |
getHandler(NFEConnectivityRule rule)
Gets the handler assigned to the given connectivity rule
|
int |
getSRID()
Gets the current NFE model's SRID
|
int[] |
getUsedConnections(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
Gets the number of in an out connections the given point contains with lines of the specified feature layer and feature class.
|
boolean |
inConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
Tells whether the line feature element is an incoming connection of the point feature element
|
boolean |
isStandaloneFeatureElement(NFEFeatureElement featElem)
Thells whether the feature element is standalone.
|
boolean |
outConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
Tells whether the line feature element is an outgoing connection of the point feature element
|
NFEFeatureElement |
requestDefaultPointFeatureElement(JGeometry pointGeom)
Creates a new standalone point feature element with the given point geometry.
|
boolean |
reserveInConnection(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
Creates a virtual in connection between the point and line feature element.
|
boolean |
reserveOutConnection(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
Creates a virtual out connection between the point and line feature element.
|
void |
reset()
Resets the state of the context
|
public NFEMemoryRuleHandlerContext(NFEModel model, NFEConnectivityRule rule)
public int[] getAvailableConnections(NFEFeatureElement pointFeatElem)
NFERuleHandlerContextgetAvailableConnections in interface NFERuleHandlerContextpointFeatElem - a point feature elementpublic int[] getUsedConnections(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
NFERuleHandlerContextgetUsedConnections in interface NFERuleHandlerContextpublic boolean connectionExists(NFEFeatureElement featElem1, NFEFeatureElement featElem2)
NFERuleHandlerContextconnectionExists in interface NFERuleHandlerContextfeatElem1 - a feature elementfeatElem2 - a feature elementpublic boolean inConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContextinConnectionExists in interface NFERuleHandlerContextpointFeatElem - a point feature elementlineFeatElem - a line feature elementpublic boolean outConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContextoutConnectionExists in interface NFERuleHandlerContextpointFeatElem - a point feature elementlineFeatElem - a line feature elementpublic NFERuleHandler getHandler(NFEConnectivityRule rule)
NFERuleHandlerContextgetHandler in interface NFERuleHandlerContextrule - a connectivity rule objectpublic boolean reserveInConnection(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContextreserveInConnection in interface NFERuleHandlerContextpointFeatElem - a point feature elementlineFeatElem - a line feature elementpublic boolean reserveOutConnection(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContextreserveOutConnection in interface NFERuleHandlerContextpointFeatElem - a point feature elementlineFeatElem - a line feature elementpublic NFEFeatureElement requestDefaultPointFeatureElement(JGeometry pointGeom)
NFERuleHandlerContextrequestDefaultPointFeatureElement in interface NFERuleHandlerContextpointGeom - a point geometrypublic boolean isStandaloneFeatureElement(NFEFeatureElement featElem)
NFERuleHandlerContextisStandaloneFeatureElement in interface NFERuleHandlerContextfeatElem - a feature elementpublic void reset()
NFERuleHandlerContextreset in interface NFERuleHandlerContextpublic int getSRID()
NFERuleHandlerContextgetSRID in interface NFERuleHandlerContextpublic NFERuleHandlerContext createContext(NFELinePointRule lpRule)
NFERuleHandlerContextcreateContext in interface NFERuleHandlerContextlpRule - a line-point rule objectpublic NFEConnectionDescriptor<NFEFeatureElement,NFEFeatureElement> createConnectionDescriptor()
NFERuleHandlerContextcreateConnectionDescriptor in interface NFERuleHandlerContextpublic NFEConnectableEdge<NFEFeatureElement> createConnectableEdge(NFEFeatureElement lineFeatElem, java.awt.geom.Point2D connPoint, IntersectionLocation connInterLoc)
NFERuleHandlerContextcreateConnectableEdge in interface NFERuleHandlerContextlineFeatElem - a line feature elementconnPoint - the point on the line where the line will be connectedconnInterLoc - the location of the line where the connection will be performedpublic NFELinePointRuleHandlerParam createLeftHandLinePointHandlerParam(NFELineLineRuleHandlerParam llhParam)
NFERuleHandlerContextcreateLeftHandLinePointHandlerParam in interface NFERuleHandlerContextllhParam - a line-line rule handler parameter objectpublic NFELinePointRuleHandlerParam createRighttHandLinePointHandlerParam(NFELineLineRuleHandlerParam llhParam)
NFERuleHandlerContextcreateRighttHandLinePointHandlerParam in interface NFERuleHandlerContextllhParam - a line-line rule handler parameter object