gpt4 book ai didi

org.apache.jempbox.xmp.XMPMetadata.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 16:30:40 27 4
gpt4 key购买 nike

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

XMPMetadata.<init>介绍

[英]Default constructor, creates blank XMP doc.
[中]默认构造函数,创建空白的XMP文档。

代码示例

代码示例来源:origin: apache/tika

public void parse(InputStream file) throws IOException, TikaException {
  ByteArrayOutputStream xmpraw = new ByteArrayOutputStream();
  if (!scanner.parse(file, xmpraw)) {
    return;
  }
  XMPMetadata xmp = null;
  try (InputStream decoded =
             new ByteArrayInputStream(xmpraw.toByteArray())
  ) {
    Document dom = XMLReaderUtils.buildDOM(decoded, EMPTY_PARSE_CONTEXT);
    if (dom != null) {
      xmp = new XMPMetadata(dom);
    }
  } catch (IOException|SAXException e) {
    //
  }
  extractDublinCore(xmp, metadata);
  extractXMPMM(xmp, metadata);
}

代码示例来源:origin: apache/tika

public void parseRawXMP(byte[] xmpData)
    throws IOException, SAXException, TikaException {
  XMPMetadata xmp = null;
  try (InputStream decoded =
         new ByteArrayInputStream(xmpData)
  ) {
    Document dom = XMLReaderUtils.buildDOM(decoded, EMPTY_PARSE_CONTEXT);
    if (dom != null) {
      xmp = new XMPMetadata(dom);
    }
  } catch (IOException|SAXException e) {
    //
  }
  if (xmp != null) {
    JempboxExtractor.extractDublinCore(xmp, metadata);
    JempboxExtractor.extractXMPMM(xmp, metadata);
  }
}

代码示例来源:origin: org.apache.pdfbox/jempbox

/**
 * Load a schema from an input source.
 * 
 * @param is
 *            The input source to load the schema from.
 * 
 * @return The loaded/parsed schema.
 * 
 * @throws IOException
 *             If there was an error while loading the schema.
 */
public static XMPMetadata load(InputSource is) throws IOException
{
  return new XMPMetadata(XMLUtil.parse(is));
}

代码示例来源:origin: org.apache.pdfbox/jempbox

/**
 * Load metadata from the filesystem.
 * 
 * @param is
 *            The stream to load the data from.
 * 
 * @return The loaded XMP document.
 * 
 * @throws IOException
 *             If there is an error reading the data.
 */
public static XMPMetadata load(InputStream is) throws IOException
{
  return new XMPMetadata(XMLUtil.parse(is));
}

代码示例来源:origin: org.apache.pdfbox/jempbox

/**
 * Load metadata from the filesystem.
 * 
 * @param file
 *            The file to load the metadata from.
 * 
 * @return The loaded XMP document.
 * 
 * @throws IOException
 *             If there is an error reading the data.
 */
public static XMPMetadata load(String file) throws IOException
{
  return new XMPMetadata(XMLUtil.parse(file));
}

代码示例来源:origin: apache/tika

xmp = new XMPMetadata(dom);

代码示例来源:origin: org.apache.tika/tika-parsers

public void parseRawXMP(byte[] xmpData)
    throws IOException, SAXException, TikaException {
  XMPMetadata xmp = null;
  try (InputStream decoded =
         new ByteArrayInputStream(xmpData)
  ) {
    Document dom = XMLReaderUtils.buildDOM(decoded, EMPTY_PARSE_CONTEXT);
    if (dom != null) {
      xmp = new XMPMetadata(dom);
    }
  } catch (IOException|SAXException e) {
    //
  }
  if (xmp != null) {
    JempboxExtractor.extractDublinCore(xmp, metadata);
    JempboxExtractor.extractXMPMM(xmp, metadata);
  }
}

代码示例来源:origin: org.apache.tika/tika-parsers

public void parse(InputStream file) throws IOException, TikaException {
  ByteArrayOutputStream xmpraw = new ByteArrayOutputStream();
  if (!scanner.parse(file, xmpraw)) {
    return;
  }
  XMPMetadata xmp = null;
  try (InputStream decoded =
             new ByteArrayInputStream(xmpraw.toByteArray())
  ) {
    Document dom = XMLReaderUtils.buildDOM(decoded, EMPTY_PARSE_CONTEXT);
    if (dom != null) {
      xmp = new XMPMetadata(dom);
    }
  } catch (IOException|SAXException e) {
    //
  }
  extractDublinCore(xmp, metadata);
  extractXMPMM(xmp, metadata);
}

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers

public void parseRawXMP(byte[] xmpData)
    throws IOException, SAXException, TikaException {
  XMPMetadata xmp = null;
  try (InputStream decoded =
         new ByteArrayInputStream(xmpData)
  ) {
    Document dom = new ParseContext().getDocumentBuilder().parse(decoded);
    if (dom != null) {
      xmp = new XMPMetadata(dom);
    }
  } catch (IOException|SAXException e) {
    //
  }
  if (xmp != null) {
    JempboxExtractor.extractDublinCore(xmp, metadata);
    JempboxExtractor.extractXMPMM(xmp, metadata);
  }
}

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers

public void parse(InputStream file) throws IOException, TikaException {
  ByteArrayOutputStream xmpraw = new ByteArrayOutputStream();
  if (!scanner.parse(file, xmpraw)) {
    return;
  }
  XMPMetadata xmp = null;
  try (InputStream decoded =
             new ByteArrayInputStream(xmpraw.toByteArray())
  ) {
    Document dom = new ParseContext().getDocumentBuilder().parse(decoded);
    if (dom != null) {
      xmp = new XMPMetadata(dom);
    }
  } catch (IOException|SAXException e) {
    //
  }
  extractDublinCore(xmp, metadata);
  extractXMPMM(xmp, metadata);
}

代码示例来源:origin: org.apache.pdfbox/jempbox

XMPMetadata metadata = new XMPMetadata();
XMPSchemaPDF pdf = metadata.addPDFSchema();
pdf.setAbout("uuid:b8659d3a-369e-11d9-b951-000393c97fd8");

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-external

xmp = new XMPMetadata(dom);

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers

xmp = new XMPMetadata(dom);

代码示例来源:origin: org.apache.tika/tika-parsers

xmp = new XMPMetadata(dom);

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