private void parseAttributesForKnownElements(Map<String, List<Entry>> subdirs, Node desc) { // NOTE: NamedNodeMap does not have any particular order... NamedNodeMap attributes = desc.getAttributes(); for (Node attr : asIterable(attributes)) { if (!XMP.ELEMENTS.contains(attr.getNamespaceURI())) { continue; } List<Entry> dir = subdirs.get(attr.getNamespaceURI()); if (dir == null) { dir = new ArrayList<Entry>(); subdirs.put(attr.getNamespaceURI(), dir); } dir.add(new XMPEntry(attr.getNamespaceURI() + attr.getLocalName(), attr.getLocalName(), attr.getNodeValue())); } }
private RDFDescription parseAsResource(Node node) { // See: http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-parsetype-resource List<Entry> entries = new ArrayList<Entry>(); for (Node child : asIterable(node.getChildNodes())) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } entries.add(new XMPEntry(child.getNamespaceURI() + child.getLocalName(), child.getLocalName(), getChildTextValue(child))); } return new RDFDescription(entries); }
private Object getChildTextValue(final Node node) { for (Node child : asIterable(node.getChildNodes())) { if (XMP.NS_RDF.equals(child.getNamespaceURI()) && "Alt".equals(child.getLocalName())) { for (Node alternative : asIterable(child.getChildNodes())) { if (XMP.NS_RDF.equals(alternative.getNamespaceURI()) && "li".equals(alternative.getLocalName())) { NamedNodeMap attributes = alternative.getAttributes(); for (Node sequence : asIterable(child.getChildNodes())) { if (XMP.NS_RDF.equals(sequence.getNamespaceURI()) && "li".equals(sequence.getLocalName())) { Object value = getChildTextValue(sequence);
private XMPDirectory parseDirectories(final Node pParentNode, NodeList pNodes, String toolkit) { Map<String, List<Entry>> subdirs = new LinkedHashMap<String, List<Entry>>(); for (Node desc : asIterable(pNodes)) { if (desc.getParentNode() != pParentNode) { continue; for (Node node : asIterable(desc.getChildNodes())) { if (node.getNodeType() != Node.ELEMENT_NODE) { continue;
private void parseAttributesForKnownElements(Map<String, List<Entry>> subdirs, Node desc) { // NOTE: NamedNodeMap does not have any particular order... NamedNodeMap attributes = desc.getAttributes(); for (Node attr : asIterable(attributes)) { if (!XMP.ELEMENTS.contains(attr.getNamespaceURI())) { continue; } List<Entry> dir = subdirs.get(attr.getNamespaceURI()); if (dir == null) { dir = new ArrayList<Entry>(); subdirs.put(attr.getNamespaceURI(), dir); } dir.add(new XMPEntry(attr.getNamespaceURI() + attr.getLocalName(), attr.getLocalName(), attr.getNodeValue())); } }
private void parseAttributesForKnownElements(Map<String, List<Entry>> subdirs, Node desc) { // NOTE: NamedNodeMap does not have any particular order... NamedNodeMap attributes = desc.getAttributes(); for (Node attr : asIterable(attributes)) { if (!XMP.ELEMENTS.contains(attr.getNamespaceURI())) { continue; } List<Entry> dir = subdirs.get(attr.getNamespaceURI()); if (dir == null) { dir = new ArrayList<Entry>(); subdirs.put(attr.getNamespaceURI(), dir); } dir.add(new XMPEntry(attr.getNamespaceURI() + attr.getLocalName(), attr.getLocalName(), attr.getNodeValue())); } }
private RDFDescription parseAsResource(Node node) { // See: http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-parsetype-resource List<Entry> entries = new ArrayList<Entry>(); for (Node child : asIterable(node.getChildNodes())) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } entries.add(new XMPEntry(child.getNamespaceURI() + child.getLocalName(), child.getLocalName(), getChildTextValue(child))); } return new RDFDescription(entries); }
private RDFDescription parseAsResource(Node node) { // See: http://www.w3.org/TR/REC-rdf-syntax/#section-Syntax-parsetype-resource List<Entry> entries = new ArrayList<Entry>(); for (Node child : asIterable(node.getChildNodes())) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue; } entries.add(new XMPEntry(child.getNamespaceURI() + child.getLocalName(), child.getLocalName(), getChildTextValue(child))); } return new RDFDescription(entries); }
private Object getChildTextValue(final Node node) { for (Node child : asIterable(node.getChildNodes())) { if (XMP.NS_RDF.equals(child.getNamespaceURI()) && "Alt".equals(child.getLocalName())) { for (Node alternative : asIterable(child.getChildNodes())) { if (XMP.NS_RDF.equals(alternative.getNamespaceURI()) && "li".equals(alternative.getLocalName())) { NamedNodeMap attributes = alternative.getAttributes(); for (Node sequence : asIterable(child.getChildNodes())) { if (XMP.NS_RDF.equals(sequence.getNamespaceURI()) && "li".equals(sequence.getLocalName())) { Object value = getChildTextValue(sequence);
private Object getChildTextValue(final Node node) { for (Node child : asIterable(node.getChildNodes())) { if (XMP.NS_RDF.equals(child.getNamespaceURI()) && "Alt".equals(child.getLocalName())) { for (Node alternative : asIterable(child.getChildNodes())) { if (XMP.NS_RDF.equals(alternative.getNamespaceURI()) && "li".equals(alternative.getLocalName())) { NamedNodeMap attributes = alternative.getAttributes(); for (Node sequence : asIterable(child.getChildNodes())) { if (XMP.NS_RDF.equals(sequence.getNamespaceURI()) && "li".equals(sequence.getLocalName())) { Object value = getChildTextValue(sequence);
private XMPDirectory parseDirectories(final Node pParentNode, NodeList pNodes) { Map<String, List<Entry>> subdirs = new LinkedHashMap<String, List<Entry>>(); for (Node desc : asIterable(pNodes)) { if (desc.getParentNode() != pParentNode) { continue; for (Node node : asIterable(desc.getChildNodes())) { if (node.getNodeType() != Node.ELEMENT_NODE) { continue; List<Entry> entries = new ArrayList<Entry>(); for (Node child : asIterable(node.getChildNodes())) { if (child.getNodeType() != Node.ELEMENT_NODE) { continue;
private XMPDirectory parseDirectories(final Node pParentNode, NodeList pNodes, String toolkit) { Map<String, List<Entry>> subdirs = new LinkedHashMap<String, List<Entry>>(); for (Node desc : asIterable(pNodes)) { if (desc.getParentNode() != pParentNode) { continue; for (Node node : asIterable(desc.getChildNodes())) { if (node.getNodeType() != Node.ELEMENT_NODE) { continue;
private XMPDirectory parseDirectories(final Node pParentNode, NodeList pNodes, String toolkit) { Map<String, List<Entry>> subdirs = new LinkedHashMap<String, List<Entry>>(); for (Node desc : asIterable(pNodes)) { if (desc.getParentNode() != pParentNode) { continue; for (Node node : asIterable(desc.getChildNodes())) { if (node.getNodeType() != Node.ELEMENT_NODE) { continue;