congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SystemViewExporter
Code IndexAdd Tabnine to your IDE (free)

How to use
SystemViewExporter
in
org.apache.jackrabbit.commons.xml

Best Java code snippets using org.apache.jackrabbit.commons.xml.SystemViewExporter (Showing top 20 results out of 315)

origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Exports the given node as an <code>sv:node</code> element.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  addAttribute(SV, "name", getXMLName(uri, local));
  startElement(SV, "node");
  exportProperties(node);
  exportNodes(node);
  endElement(SV, "node");
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Creates a system view exporter.
 *
 * @param session current session
 * @param handler SAX event handler for the export
 * @param recurse whether to recursively export the whole subtree
 * @param binary whether to export binary values
 */
public SystemViewExporter(
    Session session, ContentHandler handler,
    boolean recurse, boolean binary) {
  super(session, handler, recurse, binary);
  addNamespace("sv", SV);
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

public void write(char[] cbuf, int off, int len)
    throws IOException {
  try {
    SystemViewExporter.this.characters(cbuf, off, len);
  } catch (Exception e) {
    IOException exception = new IOException();
    exception.initCause(e);
    throw exception;
  }
}
public void close() {
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Calls {@link #exportProperty(String, String, int, Value[])}.
 */
protected void exportProperty(String uri, String local, Value value)
    throws RepositoryException, SAXException {
  // start property element
  addAttribute(SV, "name", getXMLName(uri, local));
  addAttribute(SV, "type", PropertyType.nameFromValue(value.getType()));
  startElement(SV, "property");
  // value
  exportValue(value);
  endElement(SV, "property");
}
origin: apache/jackrabbit

  throws RepositoryException, SAXException {
try {
  boolean binary = mustSendBinary(value);
  if (binary) {
    addNamespace("xs", XS);
    addNamespace("xsi", XSI);
    addAttribute(XSI, "type", getXMLName(XS, "base64Binary"));
  startElement(SV, "value");
  ValueHelper.serialize(value, false, binary, new Writer() {
    public void write(char[] cbuf, int off, int len)
  endElement(SV, "value");
} catch (IOException e) {
origin: apache/jackrabbit-oak

@Override
public void exportSystemView(String absPath, ContentHandler contentHandler,
    boolean skipBinary, boolean noRecurse) throws SAXException,
    RepositoryException {
  export(checkNotNull(absPath), new SystemViewExporter(this,
      checkNotNull(contentHandler), !noRecurse, !skipBinary));
}
origin: info.magnolia.publishing/magnolia-publishing-core

@Override
protected void exportNodes(Node node) throws RepositoryException, SAXException {
  if (recurse) {
    super.exportNodes(node);
  }
}
origin: info.magnolia.publishing/magnolia-publishing-core

  @Override
  protected String getXMLName(String uri, String local) throws RepositoryException {
    if (isFrozenNode) {
      if (FROZEN_PROPERTIES.contains(local)) {
        local = StringUtils.replace(local, "frozen", "");
        local = StringUtils.uncapitalize(local);
      } else if (FROZEN_NODE_NAME.equals(local)) {
        uri = "";
        local = nodeName;
      }
    }
    return super.getXMLName(uri, local);
  }
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Exports the given property as an <code>sv:property</code> element.
 */
protected void exportProperty(
    String uri, String local, int type, Value[] values)
    throws RepositoryException, SAXException {
  // start property element
  addAttribute(SV, "name", getXMLName(uri, local));
  addAttribute(SV, "type", PropertyType.nameFromValue(type));
  addAttribute(SV, "multiple", Boolean.TRUE.toString());
  startElement(SV, "property");
  // values
  for (int i = 0; i < values.length; i++) {
    exportValue(values[i]);
  }
  endElement(SV, "property");
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

  throws RepositoryException, SAXException {
try {
  boolean binary = mustSendBinary(value);
  if (binary) {
    addNamespace("xs", XS);
    addNamespace("xsi", XSI);
    addAttribute(XSI, "type", getXMLName(XS, "base64Binary"));
  startElement(SV, "value");
  ValueHelper.serialize(value, false, binary, new Writer() {
    public void write(char[] cbuf, int off, int len)
  endElement(SV, "value");
} catch (IOException e) {
origin: org.apache.jackrabbit/oak-jcr

@Override
public void exportSystemView(String absPath, ContentHandler contentHandler,
    boolean skipBinary, boolean noRecurse) throws SAXException,
    RepositoryException {
  export(checkNotNull(absPath), new SystemViewExporter(this,
      checkNotNull(contentHandler), !noRecurse, !skipBinary));
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Calls {@link #exportProperty(String, String, int, Value[])}.
 */
protected void exportProperty(String uri, String local, Value value)
    throws RepositoryException, SAXException {
  // start property element
  addAttribute(SV, "name", getXMLName(uri, local));
  addAttribute(SV, "type", PropertyType.nameFromValue(value.getType()));
  startElement(SV, "property");
  // value
  exportValue(value);
  endElement(SV, "property");
}
origin: apache/jackrabbit

/**
 * Exports the given node as an <code>sv:node</code> element.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  addAttribute(SV, "name", getXMLName(uri, local));
  startElement(SV, "node");
  exportProperties(node);
  exportNodes(node);
  endElement(SV, "node");
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

  throws RepositoryException, SAXException {
try {
  boolean binary = mustSendBinary(value);
  if (binary) {
    addNamespace("xs", XS);
    addNamespace("xsi", XSI);
    addAttribute(XSI, "type", getXMLName(XS, "base64Binary"));
  startElement(SV, "value");
  ValueHelper.serialize(value, false, binary, new Writer() {
    public void write(char[] cbuf, int off, int len)
  endElement(SV, "value");
} catch (IOException e) {
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

@Override
public void exportSystemView(String absPath, ContentHandler contentHandler,
    boolean skipBinary, boolean noRecurse) throws SAXException,
    RepositoryException {
  export(checkNotNull(absPath), new SystemViewExporter(this,
      checkNotNull(contentHandler), !noRecurse, !skipBinary));
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

public void write(char[] cbuf, int off, int len)
    throws IOException {
  try {
    SystemViewExporter.this.characters(cbuf, off, len);
  } catch (Exception e) {
    IOException exception = new IOException();
    exception.initCause(e);
    throw exception;
  }
}
public void close() {
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Creates a system view exporter.
 *
 * @param session current session
 * @param handler SAX event handler for the export
 * @param recurse whether to recursively export the whole subtree
 * @param binary whether to export binary values
 */
public SystemViewExporter(
    Session session, ContentHandler handler,
    boolean recurse, boolean binary) {
  super(session, handler, recurse, binary);
  addNamespace("sv", SV);
}
origin: apache/jackrabbit

/**
 * Exports the given property as an <code>sv:property</code> element.
 */
protected void exportProperty(
    String uri, String local, int type, Value[] values)
    throws RepositoryException, SAXException {
  // start property element
  addAttribute(SV, "name", getXMLName(uri, local));
  addAttribute(SV, "type", PropertyType.nameFromValue(type));
  addAttribute(SV, "multiple", Boolean.TRUE.toString());
  startElement(SV, "property");
  // values
  for (int i = 0; i < values.length; i++) {
    exportValue(values[i]);
  }
  endElement(SV, "property");
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Exports the given node as an <code>sv:node</code> element.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  addAttribute(SV, "name", getXMLName(uri, local));
  startElement(SV, "node");
  exportProperties(node);
  exportNodes(node);
  endElement(SV, "node");
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Generates a system view export using a {@link SystemViewExporter}
 * instance.
 *
 * @param path of the node to be exported
 * @param handler handler for the SAX events of the export
 * @param skipBinary whether binary values should be skipped
 * @param noRecurse whether to export just the identified node
 * @throws PathNotFoundException if a node at the given path does not exist
 * @throws SAXException if the SAX event handler failed
 * @throws RepositoryException if another error occurs
 */
public void exportSystemView(
    String path, ContentHandler handler,
    boolean skipBinary, boolean noRecurse)
    throws PathNotFoundException, SAXException, RepositoryException {
  export(path, new SystemViewExporter(
      this, handler, !noRecurse, !skipBinary));
}
org.apache.jackrabbit.commons.xmlSystemViewExporter

Javadoc

System view exporter.

Most used methods

  • <init>
    Creates a system view exporter.
  • exportNodes
  • getXMLName
  • addAttribute
  • addNamespace
  • characters
  • endElement
  • exportProperties
  • exportValue
    Exports the given value as an sv:value element.
  • mustSendBinary
    Utility method for determining whether a non-binary value should still be exported in base64 encodin
  • startElement
  • export
  • startElement,
  • export,
  • exportNode

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now