Class NodeFactoryImpl
- java.lang.Object
-
- org.goplanit.utils.id.ManagedIdEntityFactoryImpl<E>
-
- org.goplanit.graph.GraphEntityFactoryImpl<Node>
-
- org.goplanit.network.layer.physical.NodeFactoryImpl
-
- All Implemented Interfaces:
GraphEntityFactory<Node>,ManagedIdEntityFactory<Node>,NodeFactory
public class NodeFactoryImpl extends GraphEntityFactoryImpl<Node> implements NodeFactory
Factory for creating nodes on nodes container- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
groupIdToken
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNodeFactoryImpl(IdGroupingToken groupId, Nodes vertices)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodecreateNew()Create a new node (without registering)NoderegisterNew()Create and register new nodeNoderegisterNew(org.locationtech.jts.geom.Point position, boolean syncXmlIdToId)Register a new node and set its geometry and potentially sync its XML id to the underlying internal id-
Methods inherited from class org.goplanit.graph.GraphEntityFactoryImpl
getGraphEntities, setGraphEntities
-
Methods inherited from class org.goplanit.utils.id.ManagedIdEntityFactoryImpl
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ManagedIdEntityFactory
createUniqueDeepCopyOf, createUniqueShallowCopyOf, getIdGroupingToken, setIdGroupingToken
-
Methods inherited from interface org.goplanit.utils.network.layer.physical.NodeFactory
createNew
-
-
-
-
Constructor Detail
-
NodeFactoryImpl
protected NodeFactoryImpl(IdGroupingToken groupId, Nodes vertices)
Constructor- Parameters:
groupId- to usevertices- to use
-
-
Method Detail
-
createNew
public Node createNew()
Create a new node (without registering)- Specified by:
createNewin interfaceNodeFactory- Returns:
- created node
-
registerNew
public Node registerNew()
Create and register new node- Specified by:
registerNewin interfaceNodeFactory- Returns:
- new node created
-
registerNew
public Node registerNew(org.locationtech.jts.geom.Point position, boolean syncXmlIdToId)
Register a new node and set its geometry and potentially sync its XML id to the underlying internal id- Specified by:
registerNewin interfaceNodeFactory- Parameters:
position- to usesyncXmlIdToId- when true set XML id to internal id, when false leave it null- Returns:
- created and registered node
-
-