public String toScriptNodeLocation(boolean errIfNull) { this.used = true; nodeLocationDeleg.setUsed(); if (nodeLocationDeleg instanceof NodeLocationAlreadyCachedNotParentImpl) { NodeLocationAlreadyCachedNotParentImpl nodeLocDeleg = (NodeLocationAlreadyCachedNotParentImpl) nodeLocationDeleg; if (newCachedParentIds == null) return toScriptArray(nodeLocDeleg.getIdAsScript()); // 1 item else { return toScriptArray(nodeLocDeleg.getIdAsScript() + "," + toScriptArrayCachedParents()); } } else if (nodeLocationDeleg instanceof NodeLocationPathBasedNotParentImpl) { NodeLocationPathBasedNotParentImpl nodeLocDeleg = (NodeLocationPathBasedNotParentImpl) nodeLocationDeleg; StringBuilder code = new StringBuilder(); code.append( getCachedParentIdAsScript() + "," + nodeLocDeleg.getIdAsScript() + "," + nodeLocDeleg.getPathAsScript()); // 3 items if (newCachedParentIds != null) code.append( "," + toScriptArrayCachedParents()); // 4 items (el último un array dentro de array) return toScriptArray(code.toString()); } else throw new ItsNatException("INTERNAL ERROR"); }
@Override public Node getNode() { return nodeLocationDeleg.getNode(); }
public boolean isJustCached() { return nodeLocationDeleg.isJustCached(); }