javax.jcr.Session.exportDocumentView()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(7.7k)|赞(0)|评价(0)|浏览(78)

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

Session.exportDocumentView介绍

[英]Serializes the node (and if noRecurse is false, the whole subgraph) at absPath as an XML stream and outputs it to the supplied OutputStream. The resulting XML is in the document view form. Note that absPath must be the path of a node, not a property.

If skipBinary is true then any properties of PropertyType.BINARY will be serialized as if they are empty. That is, the existence of the property will be serialized, but its content will not appear in the serialized output (the value of the attribute will be empty). If skipBinary is false then the actual value(s) of each BINARY property is recorded using Base64 encoding.

If noRecurse is true then only the node at absPath and its properties, but not its child nodes, are serialized. If noRecurse is false then the entire subgraph rooted at absPath is serialized.

If the user lacks read access to some subsection of the specified tree, that section simply does not get serialized, since, from the user's point of view, it is not there.

The serialized output will reflect the state of the current workspace as modified by the state of this Session. This means that pending changes (regardless of whether they are valid according to node type constraints) and all namespace mappings in the namespace registry, as modified by the current session-mappings, are reflected in the output.

The output XML will be encoded in UTF-8.

It is the responsibility of the caller to close the passed OutputStream.
[中]将absPath处的节点(如果noRecursefalse,则整个子图)序列化为XML流,并将其输出到提供的OutputStream。生成的XML位于文档视图表单中。请注意absPath必须是节点的路径,而不是属性。
如果skipBinary为真,则PropertyType.BINARY的任何属性都将被序列化,就像它们是空的一样。也就是说,属性的存在将被序列化,但其内容不会出现在序列化的输出中(属性的值将为空)。如果skipBinary为false,则使用Base64编码记录每个BINARY属性的实际值。
如果noRecurse为true,则只序列化absPath处的节点及其属性,而不序列化其子节点。如果noRecursefalse,则根于absPath的整个子图将被序列化。
如果用户缺乏对指定树的某个子部分的读取权限,该部分就不会被序列化,因为从用户的角度来看,它不在那里。
序列化输出将反映当前工作区的状态,该状态由该Session的状态修改。这意味着挂起的更改(无论根据节点类型约束这些更改是否有效)和命名空间注册表中由当前会话映射修改的所有命名空间映射都会反映在输出中。
输出XML将以UTF-8编码。
来电者有责任关闭已通过的OutputStream

代码示例

代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector

/**
 * Forwards the method call to the underlying session.
 */
public void exportDocumentView(String absPath, ContentHandler contentHandler, boolean binaryAsLink,
    boolean noRecurse) throws PathNotFoundException, SAXException, RepositoryException {
  session.exportDocumentView(absPath, contentHandler, binaryAsLink, noRecurse);
}

代码示例来源:origin: org.onehippo.cms7/hippo-repository-connector

/**
 * Forwards the method call to the underlying session.
 */
public void exportDocumentView(String absPath, OutputStream out, boolean binaryAsLink, boolean noRecurse)
    throws IOException, PathNotFoundException, RepositoryException {
  session.exportDocumentView(absPath, out, binaryAsLink, noRecurse);
}

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

@Override
public void exportDocumentView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse)
    throws SAXException, RepositoryException {
  delegate.exportDocumentView(absPath, contentHandler, skipBinary, noRecurse);
}

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

@Override
public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, RepositoryException {
  delegate.exportDocumentView(absPath, out, skipBinary, noRecurse);
}

代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons

@Override
default void exportDocumentView(final String absPath,
                final OutputStream out,
                final boolean skipBinary,
                final boolean noRecurse)
    throws IOException, PathNotFoundException, RepositoryException {
  unwrapSession().exportDocumentView(absPath, out, skipBinary, noRecurse);
}

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

/**
 * Export document view.
 */
public void exportDocumentView(String arg0, OutputStream arg1, boolean arg2, boolean arg3)
    throws IOException, PathNotFoundException, RepositoryException {
  getSession().exportDocumentView(arg0, arg1, arg2, arg3);
}

代码示例来源:origin: ModeShape/modeshape

@Override
public void exportDocumentView( String string,
                OutputStream out,
                boolean bln,
                boolean bln1 ) throws IOException, PathNotFoundException, RepositoryException {
  session().exportDocumentView(string, out, bln, bln1);
}

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

/**
 * @see DefaultHandler#exportData(ExportContext, boolean, Node)
 */
@Override
protected void exportData(ExportContext context, boolean isCollection, Node contentNode) throws IOException, RepositoryException {
  // first child of content is XML document root
  if (contentNode.getNodes().hasNext()) {
    contentNode = contentNode.getNodes().nextNode();
  }
  OutputStream out = context.getOutputStream();
  contentNode.getSession().exportDocumentView(contentNode.getPath(), out, true, false);
}

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

/**
 * Export document view.
 */
public void exportDocumentView(String arg0, ContentHandler arg1, boolean arg2, boolean arg3)
    throws PathNotFoundException, SAXException, RepositoryException {
  getSession().exportDocumentView(arg0, arg1, arg2, arg3);
}

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

/** {@inheritDoc} */
public byte[] exportDocumentView(
    String path, boolean binaryAsLink, boolean noRecurse)
    throws IOException, RepositoryException, RemoteException {
  try {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    session.exportDocumentView(path, buffer, binaryAsLink, noRecurse);
    return buffer.toByteArray();
  } catch (RepositoryException ex) {
    throw getRepositoryException(ex);
  }
}

代码示例来源:origin: info.magnolia/magnolia-core

@Override
public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, PathNotFoundException, RepositoryException {
  getWrappedSession().exportDocumentView(absPath, out, skipBinary, noRecurse);
}

代码示例来源:origin: ModeShape/modeshape

@Override
public void exportDocumentView( String string,
                ContentHandler ch,
                boolean bln,
                boolean bln1 ) throws PathNotFoundException, SAXException, RepositoryException {
  session().exportDocumentView(string, ch, bln, bln1);
}

代码示例来源:origin: ModeShape/modeshape

@Override
public void exportSystemView( String string,
               OutputStream out,
               boolean bln,
               boolean bln1 ) throws IOException, PathNotFoundException, RepositoryException {
  session().exportDocumentView(string, out, bln, bln1);
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jca

/**
 * Export document view.
 */
public void exportDocumentView(String arg0, OutputStream arg1, boolean arg2, boolean arg3)
    throws IOException, PathNotFoundException, RepositoryException {
  getSession().exportDocumentView(arg0, arg1, arg2, arg3);
}

代码示例来源:origin: org.apache.jackrabbit/jackrabbit-jca

/**
 * Export document view.
 */
public void exportDocumentView(String arg0, ContentHandler arg1, boolean arg2, boolean arg3)
    throws PathNotFoundException, SAXException, RepositoryException {
  getSession().exportDocumentView(arg0, arg1, arg2, arg3);
}

代码示例来源:origin: info.magnolia/magnolia-core

@Override
public void exportDocumentView(String absPath, ContentHandler contentHandler, boolean skipBinary, boolean noRecurse) throws PathNotFoundException, SAXException, RepositoryException {
  getWrappedSession().exportDocumentView(absPath, contentHandler, skipBinary, noRecurse);
}

代码示例来源:origin: brix-cms/brix-cms

public void exportDocumentView(String absPath, OutputStream out, boolean skipBinary,
                boolean noRecurse) throws IOException, RepositoryException {
  getDelegate().exportDocumentView(absPath, out, skipBinary, noRecurse);
}

代码示例来源:origin: brix-cms/brix-cms

public void exportDocumentView(String absPath, ContentHandler contentHandler,
                boolean skipBinary, boolean noRecurse) throws SAXException, RepositoryException {
  getDelegate().exportDocumentView(absPath, contentHandler, skipBinary, noRecurse);
}

代码示例来源:origin: net.adamcin.commons/net.adamcin.commons.jcr

public void exportDocumentView(String s, ContentHandler contentHandler, boolean b, boolean b2)
    throws SAXException, RepositoryException
{ getSession().exportDocumentView(s, contentHandler, b, b2); }

代码示例来源:origin: net.adamcin.commons/net.adamcin.commons.jcr

public void exportDocumentView(String s, OutputStream outputStream, boolean b, boolean b2)
    throws IOException, RepositoryException
{ getSession().exportDocumentView(s, outputStream, b, b2); }

相关文章

微信公众号

最新文章

更多