private void parseDataTypes(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("dataType".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidDataType(uri)) { throw new PolicyEditorException("Invalid DataType : " + uri); } holder.getDataTypeMap().put(name, uri); } } if ("defaultDataTypes".equals(node.getNodeName())) { holder.setDefaultDataType(node.getTextContent()); } } }
private void parseDataTypes(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("dataType".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidDataType(uri)) { throw new PolicyEditorException("Invalid DataType : " + uri); } holder.getDataTypeMap().put(name, uri); } } if ("defaultDataTypes".equals(node.getNodeName())) { holder.setDefaultDataType(node.getTextContent()); } } }
private void parseDataTypes(Node root, PolicyEditorDataHolder holder) throws PolicyEditorException { NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); if ("dataType".equals(node.getNodeName())) { String name = null; String uri = null; NodeList childList = node.getChildNodes(); for (int j = 0; j < childList.getLength(); j++) { Node child = childList.item(j); if ("name".equals(child.getNodeName())) { name = child.getTextContent(); } else if ("uri".equals(child.getNodeName())) { uri = child.getTextContent(); } } if (name != null && uri != null) { if (!Utils.isValidDataType(uri)) { throw new PolicyEditorException("Invalid DataType : " + uri); } holder.getDataTypeMap().put(name, uri); } } if ("defaultDataTypes".equals(node.getNodeName())) { holder.setDefaultDataType(node.getTextContent()); } } }