@Override public org.mwg.Node newTypedNode(long world, long time, String nodeType) { if (nodeType == null) { throw new RuntimeException("nodeType should not be null"); } if (!_isConnected.get()) { throw new RuntimeException(CoreConstants.DISCONNECTED_ERROR); } final int extraCode = _resolver.stringToHash(nodeType, false); final NodeFactory resolvedFactory = factoryByCode(extraCode); BaseNode newNode; if (resolvedFactory == null) { System.out.println("WARNING: UnKnow NodeType " + nodeType + ", missing plugin configuration in the builder ? Using generic node as a fallback"); newNode = new BaseNode(world, time, this._nodeKeyCalculator.newKey(), this); } else { newNode = (BaseNode) resolvedFactory.create(world, time, this._nodeKeyCalculator.newKey(), this); } this._resolver.initNode(newNode, extraCode); return newNode; }
newNode = new BaseNode(origin.world(), origin.time(), origin.id(), this); } else { newNode = (BaseNode) resolvedFactory.create(origin.world(), origin.time(), origin.id(), this);