Tabnine Logo
Exporter.exportNode
Code IndexAdd Tabnine to your IDE (free)

How to use
exportNode
method
in
org.apache.jackrabbit.commons.xml.Exporter

Best Java code snippets using org.apache.jackrabbit.commons.xml.Exporter.exportNode (Showing top 9 results out of 315)

origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Called by {@link #exportNode(String, String, Node)} to recursively
 * call {@link #exportNode(String, String, Node)} for each child node.
 * Does nothing if this exporter is not recursive. 
 *
 * @param node parent node
 * @throws RepositoryException if a repository error occurs
 * @throws SAXException if a SAX error occurs
 */
protected void exportNodes(Node node)
    throws RepositoryException, SAXException {
  if (recurse && !share) {
    NodeIterator iterator = node.getNodes();
    while (iterator.hasNext()) {
      Node child = iterator.nextNode();
      exportNode(child);
    }
  }
}
origin: apache/jackrabbit

/**
 * Called by {@link #exportNode(String, String, Node)} to recursively
 * call {@link #exportNode(String, String, Node)} for each child node.
 * Does nothing if this exporter is not recursive. 
 *
 * @param node parent node
 * @throws RepositoryException if a repository error occurs
 * @throws SAXException if a SAX error occurs
 */
protected void exportNodes(Node node)
    throws RepositoryException, SAXException {
  if (recurse && !share) {
    NodeIterator iterator = node.getNodes();
    while (iterator.hasNext()) {
      Node child = iterator.nextNode();
      exportNode(child);
    }
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Called by {@link #exportNode(String, String, Node)} to recursively
 * call {@link #exportNode(String, String, Node)} for each child node.
 * Does nothing if this exporter is not recursive. 
 *
 * @param node parent node
 * @throws RepositoryException if a repository error occurs
 * @throws SAXException if a SAX error occurs
 */
protected void exportNodes(Node node)
    throws RepositoryException, SAXException {
  if (recurse && !share) {
    NodeIterator iterator = node.getNodes();
    while (iterator.hasNext()) {
      Node child = iterator.nextNode();
      exportNode(child);
    }
  }
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Utility method for exporting the given node. Parses the node name
 * (or <code>jcr:root</code> if given the root node) and calls
 * {@link #exportNode(String, String, Node)} with the resolved namespace
 * URI and the local part of the name.
 *
 * @param node node
 * @throws RepositoryException if a repository error occurs
 * @throws SAXException if a SAX error occurs
 */
private void exportNode(Node node)
    throws RepositoryException, SAXException {
  share = node.isNodeType(helper.getJcrName("mix:shareable"))
    && !shareables.add(node.getUUID());
  if (node.getDepth() == 0) {
    exportNode(NamespaceHelper.JCR, "root", node);
  } else {
    String name = node.getName();
    int colon = name.indexOf(':');
    if (colon == -1) {
      exportNode("", name, node);
    } else {
      String uri = session.getNamespaceURI(name.substring(0, colon));
      exportNode(uri, name.substring(colon + 1), node);
    }
  }
}
origin: apache/jackrabbit

/**
 * Utility method for exporting the given node. Parses the node name
 * (or <code>jcr:root</code> if given the root node) and calls
 * {@link #exportNode(String, String, Node)} with the resolved namespace
 * URI and the local part of the name.
 *
 * @param node node
 * @throws RepositoryException if a repository error occurs
 * @throws SAXException if a SAX error occurs
 */
private void exportNode(Node node)
    throws RepositoryException, SAXException {
  share = node.isNodeType(helper.getJcrName("mix:shareable"))
    && !shareables.add(node.getUUID());
  if (node.getDepth() == 0) {
    exportNode(NamespaceHelper.JCR, "root", node);
  } else {
    String name = node.getName();
    int colon = name.indexOf(':');
    if (colon == -1) {
      exportNode("", name, node);
    } else {
      String uri = session.getNamespaceURI(name.substring(0, colon));
      exportNode(uri, name.substring(colon + 1), node);
    }
  }
}
origin: apache/jackrabbit

/**
 * Exports the given node by preparing the export and calling the
 * abstract {@link #exportNode(String, String, Node)} method to give
 * control of the export format to a subclass.
 * <p>
 * This method should be called only once for an exporter instance.
 *
 * @param node node to be exported
 * @throws SAXException if a SAX error occurs
 * @throws RepositoryException if a repository error occurs
 */
public void export(Node node) throws RepositoryException, SAXException {
  handler.startDocument();
  String[] prefixes = session.getNamespacePrefixes();
  for (int i = 0; i < prefixes.length; i++) {
    if (prefixes[i].length() > 0 && !prefixes[i].equals("xml") ) {
      addNamespace(prefixes[i], session.getNamespaceURI(prefixes[i]));
    }
  }
  exportNode(node);
  handler.endDocument();
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Exports the given node by preparing the export and calling the
 * abstract {@link #exportNode(String, String, Node)} method to give
 * control of the export format to a subclass.
 * <p>
 * This method should be called only once for an exporter instance.
 *
 * @param node node to be exported
 * @throws SAXException if a SAX error occurs
 * @throws RepositoryException if a repository error occurs
 */
public void export(Node node) throws RepositoryException, SAXException {
  handler.startDocument();
  String[] prefixes = session.getNamespacePrefixes();
  for (int i = 0; i < prefixes.length; i++) {
    if (prefixes[i].length() > 0 && !prefixes[i].equals("xml") ) {
      addNamespace(prefixes[i], session.getNamespaceURI(prefixes[i]));
    }
  }
  exportNode(node);
  handler.endDocument();
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Utility method for exporting the given node. Parses the node name
 * (or <code>jcr:root</code> if given the root node) and calls
 * {@link #exportNode(String, String, Node)} with the resolved namespace
 * URI and the local part of the name.
 *
 * @param node node
 * @throws RepositoryException if a repository error occurs
 * @throws SAXException if a SAX error occurs
 */
private void exportNode(Node node)
    throws RepositoryException, SAXException {
  share = node.isNodeType(helper.getJcrName("mix:shareable"))
    && !shareables.add(node.getUUID());
  if (node.getDepth() == 0) {
    exportNode(NamespaceHelper.JCR, "root", node);
  } else {
    String name = node.getName();
    int colon = name.indexOf(':');
    if (colon == -1) {
      exportNode("", name, node);
    } else {
      String uri = session.getNamespaceURI(name.substring(0, colon));
      exportNode(uri, name.substring(colon + 1), node);
    }
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Exports the given node by preparing the export and calling the
 * abstract {@link #exportNode(String, String, Node)} method to give
 * control of the export format to a subclass.
 * <p>
 * This method should be called only once for an exporter instance.
 *
 * @param node node to be exported
 * @throws SAXException if a SAX error occurs
 * @throws RepositoryException if a repository error occurs
 */
public void export(Node node) throws RepositoryException, SAXException {
  handler.startDocument();
  String[] prefixes = session.getNamespacePrefixes();
  for (int i = 0; i < prefixes.length; i++) {
    if (prefixes[i].length() > 0 && !prefixes[i].equals("xml") ) {
      addNamespace(prefixes[i], session.getNamespaceURI(prefixes[i]));
    }
  }
  exportNode(node);
  handler.endDocument();
}
org.apache.jackrabbit.commons.xmlExporterexportNode

Javadoc

Utility method for exporting the given node. Parses the node name (or jcr:root if given the root node) and calls #exportNode(String,String,Node) with the resolved namespace URI and the local part of the name.

Popular methods of Exporter

  • export
    Exports the given node by preparing the export and calling the abstract #exportNode(String,String,No
  • addNamespace
    Adds the given namespace to the export. A unique prefix based on the given prefix hint is mapped to
  • exportProperty
    Utility method for processing the named property from the given map of properties. If the property e
  • getPrefix
    Returns the namespace prefix mapped to the given URI. Returnsnull if the namespace URI is not regist
  • getProperties
    Returns a sorted map of the properties of the given node.
  • getUniquePrefix
    Returns a unique namespace prefix based on the given hint. We need prefixes to be unique within the
  • getXMLName
    Returns a prefixed XML name for the given namespace URI and local name. If a prefix mapping for the
  • prefixExists
    Checks whether the given prefix is already mapped within the current namespace stack.

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JFileChooser (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
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