public void update() {
		namedNodes = new HashMap<Object, JadeNode>();
		internalNodes = new LinkedHashSet<JadeNode>();
		externalNodes = new LinkedHashSet<JadeNode>();
		if (root == null) { return; }
		for (TreeNode node : nodes(NodeOrder.PREORDER)) {
			Object name = node.getLabel();
			if (! (name == null || (name instanceof String && ((String)name).length() < 1)) && namedNodes.containsKey(name)) {
				throw new IllegalStateException("duplicate node name: " + name);
			}
			namedNodes.put(name, (JadeNode) node);
			if (node.isExternal()) {
				externalNodes.add((JadeNode) node);
			} else {
				internalNodes.add((JadeNode) node);
			}
		}
	}