gpt4 book ai didi

com.twelvemonkeys.imageio.metadata.xmp.XMPReader.asIterable()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 20:33:05 27 4
gpt4 key购买 nike

本文整理了Java中com.twelvemonkeys.imageio.metadata.xmp.XMPReader.asIterable()方法的一些代码示例,展示了XMPReader.asIterable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMPReader.asIterable()方法的具体详情如下:
包路径:com.twelvemonkeys.imageio.metadata.xmp.XMPReader
类名称:XMPReader
方法名:asIterable

XMPReader.asIterable介绍

暂无

代码示例

代码示例来源:origin: haraldk/TwelveMonkeys

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()));
  }
}

代码示例来源:origin: haraldk/TwelveMonkeys

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);
}

代码示例来源:origin: haraldk/TwelveMonkeys

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);

代码示例来源:origin: haraldk/TwelveMonkeys

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;

代码示例来源:origin: com.twelvemonkeys.imageio/imageio-metadata

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()));
  }
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-metadata

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()));
  }
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-metadata

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);
}

代码示例来源:origin: com.twelvemonkeys.imageio/imageio-metadata

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);
}

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-metadata

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);

代码示例来源:origin: com.twelvemonkeys.imageio/imageio-metadata

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);

代码示例来源:origin: com.twelvemonkeys.imageio/twelvemonkeys-imageio-metadata

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;

代码示例来源:origin: com.twelvemonkeys.imageio/imageio-metadata

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;

代码示例来源:origin: com.github.lafa.twelvemonkeyspurejava.imageio/imageio-metadata

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;

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com