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)
NFERuleHandlerContext
getAvailableConnections
in interface NFERuleHandlerContext
pointFeatElem
- a point feature elementpublic int[] getUsedConnections(NFEFeatureElement pointFeatElem, long lineFeatLayerId, long lineFeatClassId)
NFERuleHandlerContext
getUsedConnections
in interface NFERuleHandlerContext
public boolean connectionExists(NFEFeatureElement featElem1, NFEFeatureElement featElem2)
NFERuleHandlerContext
connectionExists
in interface NFERuleHandlerContext
featElem1
- a feature elementfeatElem2
- a feature elementpublic boolean inConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContext
inConnectionExists
in interface NFERuleHandlerContext
pointFeatElem
- a point feature elementlineFeatElem
- a line feature elementpublic boolean outConnectionExists(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContext
outConnectionExists
in interface NFERuleHandlerContext
pointFeatElem
- a point feature elementlineFeatElem
- a line feature elementpublic NFERuleHandler getHandler(NFEConnectivityRule rule)
NFERuleHandlerContext
getHandler
in interface NFERuleHandlerContext
rule
- a connectivity rule objectpublic boolean reserveInConnection(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContext
reserveInConnection
in interface NFERuleHandlerContext
pointFeatElem
- a point feature elementlineFeatElem
- a line feature elementpublic boolean reserveOutConnection(NFEFeatureElement pointFeatElem, NFEFeatureElement lineFeatElem)
NFERuleHandlerContext
reserveOutConnection
in interface NFERuleHandlerContext
pointFeatElem
- a point feature elementlineFeatElem
- a line feature elementpublic NFEFeatureElement requestDefaultPointFeatureElement(JGeometry pointGeom)
NFERuleHandlerContext
requestDefaultPointFeatureElement
in interface NFERuleHandlerContext
pointGeom
- a point geometrypublic boolean isStandaloneFeatureElement(NFEFeatureElement featElem)
NFERuleHandlerContext
isStandaloneFeatureElement
in interface NFERuleHandlerContext
featElem
- a feature elementpublic void reset()
NFERuleHandlerContext
reset
in interface NFERuleHandlerContext
public int getSRID()
NFERuleHandlerContext
getSRID
in interface NFERuleHandlerContext
public NFERuleHandlerContext createContext(NFELinePointRule lpRule)
NFERuleHandlerContext
createContext
in interface NFERuleHandlerContext
lpRule
- a line-point rule objectpublic NFEConnectionDescriptor<NFEFeatureElement,NFEFeatureElement> createConnectionDescriptor()
NFERuleHandlerContext
createConnectionDescriptor
in interface NFERuleHandlerContext
public NFEConnectableEdge<NFEFeatureElement> createConnectableEdge(NFEFeatureElement lineFeatElem, java.awt.geom.Point2D connPoint, IntersectionLocation connInterLoc)
NFERuleHandlerContext
createConnectableEdge
in interface NFERuleHandlerContext
lineFeatElem
- 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)
NFERuleHandlerContext
createLeftHandLinePointHandlerParam
in interface NFERuleHandlerContext
llhParam
- a line-line rule handler parameter objectpublic NFELinePointRuleHandlerParam createRighttHandLinePointHandlerParam(NFELineLineRuleHandlerParam llhParam)
NFERuleHandlerContext
createRighttHandLinePointHandlerParam
in interface NFERuleHandlerContext
llhParam
- a line-line rule handler parameter object