com.xmlcalabash.extensions.Zip.storeJSON()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(84)

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

Zip.storeJSON介绍

暂无

代码示例

代码示例来源:origin: com.xmlcalabash/xmlcalabash

protected void store(FileToZip file, XdmNode doc, OutputStream out) throws SaxonApiException, IOException {
  XdmNode root = S9apiUtils.getDocumentElement(doc);
  if (((XProcConstants.NS_XPROC_STEP.equals(root.getNodeName().getNamespaceURI())
      && "base64".equals(root.getAttributeValue(_encoding)))
      || ("".equals(root.getNodeName().getNamespaceURI())
      && "base64".equals(root.getAttributeValue(c_encoding))))) {
    storeBinary(file, doc, out);
  } else if (XProcConstants.c_result.equals(root.getNodeName())
      && root.getAttributeValue(_content_type) != null
      && root.getAttributeValue(_content_type).startsWith("text/")) {
    storeText(file, doc, out);
  } else if (runtime.transparentJSON()
      && (((c_body.equals(root.getNodeName())
      && ("application/json".equals(root.getAttributeValue(_content_type))
      || "text/json".equals(root.getAttributeValue(_content_type))))
      || c_json.equals(root.getNodeName()))
      || JSONtoXML.JSONX_NS.equals(root.getNodeName().getNamespaceURI())
      || JSONtoXML.JXML_NS.equals(root.getNodeName().getNamespaceURI())
      || JSONtoXML.MLJS_NS.equals(root.getNodeName().getNamespaceURI()))) {
    storeJSON(file, doc, out);
  } else {
    storeXML(file, doc, out);
  }
}

代码示例来源:origin: org.daisy.libs/com.xmlcalabash

protected void store(FileToZip file, XdmNode doc, OutputStream out) throws SaxonApiException, IOException {
  XdmNode root = S9apiUtils.getDocumentElement(doc);
  if (((XProcConstants.NS_XPROC_STEP.equals(root.getNodeName().getNamespaceURI())
      && "base64".equals(root.getAttributeValue(_encoding)))
      || ("".equals(root.getNodeName().getNamespaceURI())
      && "base64".equals(root.getAttributeValue(c_encoding))))) {
    storeBinary(file, doc, out);
  } else if (XProcConstants.c_result.equals(root.getNodeName())
      && root.getAttributeValue(_content_type) != null
      && root.getAttributeValue(_content_type).startsWith("text/")) {
    storeText(file, doc, out);
  } else if (runtime.transparentJSON()
      && (((c_body.equals(root.getNodeName())
      && ("application/json".equals(root.getAttributeValue(_content_type))
      || "text/json".equals(root.getAttributeValue(_content_type))))
      || c_json.equals(root.getNodeName()))
      || JSONtoXML.JSONX_NS.equals(root.getNodeName().getNamespaceURI())
      || JSONtoXML.JXML_NS.equals(root.getNodeName().getNamespaceURI())
      || JSONtoXML.MLJS_NS.equals(root.getNodeName().getNamespaceURI()))) {
    storeJSON(file, doc, out);
  } else {
    storeXML(file, doc, out);
  }
}

相关文章