public MapElement getMapElement(int index) { return (MapElement)this.getValue(MAP_ELEMENT, index); }
public MapElement getMapElement(int index) { return (MapElement)this.getValue(MAP_ELEMENT, index); }
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, RoleMap descriptor) { Element roleMapNode = (Element) super.writeDescriptor(parent, nodeName, descriptor); appendTextChild(roleMapNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription()); setAttribute(roleMapNode, RuntimeTagNames.MAP_ID, (String) descriptor.getValue(RoleMap.MAP_ID)); // map-element* MapElement[] maps = descriptor.getMapElement(); if (maps.length>0) { MapElementNode men = new MapElementNode(); for (int i=0;i<maps.length;i++) { men.writeDescriptor(roleMapNode, RuntimeTagNames.MAP_ELEMENT, maps[i]); } } return roleMapNode; } }
/** * write the descriptor class to a DOM tree and return it * * @param parent node for the DOM tree * @param node name for the descriptor * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, RoleMap descriptor) { Element roleMapNode = (Element) super.writeDescriptor(parent, nodeName, descriptor); appendTextChild(roleMapNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription()); setAttribute(roleMapNode, RuntimeTagNames.MAP_ID, (String) descriptor.getValue(RoleMap.MAP_ID)); // map-element* MapElement[] maps = descriptor.getMapElement(); if (maps.length>0) { MapElementNode men = new MapElementNode(); for (int i=0;i<maps.length;i++) { men.writeDescriptor(roleMapNode, RuntimeTagNames.MAP_ELEMENT, maps[i]); } } return roleMapNode; } }