Tabnine Logo
DocumentViewExporter.characters
Code IndexAdd Tabnine to your IDE (free)

How to use
characters
method
in
org.apache.jackrabbit.commons.xml.DocumentViewExporter

Best Java code snippets using org.apache.jackrabbit.commons.xml.DocumentViewExporter.characters (Showing top 3 results out of 315)

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

/**
 * Exports the given node either as XML characters (if it's an
 * <code>xml:text</code> node) or as an XML element with properties
 * mapped to XML attributes.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  if (NamespaceHelper.JCR.equals(uri) && "xmltext".equals(local)) {
    try {
      // assume jcr:xmlcharacters is single-valued
      Property property =
        node.getProperty(helper.getJcrName("jcr:xmlcharacters"));
      char[] ch = property.getString().toCharArray();
      characters(ch, 0, ch.length);
    } catch (PathNotFoundException e) {
      // jcr:xmlcharacters not found, ignore this node
    }
  } else {
    // attributes (properties)
    exportProperties(node);
    // encode node name to make sure it's a valid xml name
    String encoded = ISO9075.encode(local);
    startElement(uri, encoded);
    exportNodes(node);
    endElement(uri, encoded);
  }
}
origin: apache/jackrabbit

/**
 * Exports the given node either as XML characters (if it's an
 * <code>xml:text</code> node) or as an XML element with properties
 * mapped to XML attributes.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  if (NamespaceHelper.JCR.equals(uri) && "xmltext".equals(local)) {
    try {
      // assume jcr:xmlcharacters is single-valued
      Property property =
        node.getProperty(helper.getJcrName("jcr:xmlcharacters"));
      char[] ch = property.getString().toCharArray();
      characters(ch, 0, ch.length);
    } catch (PathNotFoundException e) {
      // jcr:xmlcharacters not found, ignore this node
    }
  } else {
    // attributes (properties)
    exportProperties(node);
    // encode node name to make sure it's a valid xml name
    String encoded = ISO9075.encode(local);
    startElement(uri, encoded);
    exportNodes(node);
    endElement(uri, encoded);
  }
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Exports the given node either as XML characters (if it's an
 * <code>xml:text</code> node) or as an XML element with properties
 * mapped to XML attributes.
 */
protected void exportNode(String uri, String local, Node node)
    throws RepositoryException, SAXException {
  if (NamespaceHelper.JCR.equals(uri) && "xmltext".equals(local)) {
    try {
      // assume jcr:xmlcharacters is single-valued
      Property property =
        node.getProperty(helper.getJcrName("jcr:xmlcharacters"));
      char[] ch = property.getString().toCharArray();
      characters(ch, 0, ch.length);
    } catch (PathNotFoundException e) {
      // jcr:xmlcharacters not found, ignore this node
    }
  } else {
    // attributes (properties)
    exportProperties(node);
    // encode node name to make sure it's a valid xml name
    String encoded = ISO9075.encode(local);
    startElement(uri, encoded);
    exportNodes(node);
    endElement(uri, encoded);
  }
}
org.apache.jackrabbit.commons.xmlDocumentViewExportercharacters

Popular methods of DocumentViewExporter

  • <init>
    Creates a document view exporter.
  • addAttribute
  • exportNodes
  • endElement
  • exportProperties
  • startElement
  • exportNode
    Exports the given node either as XML characters (if it's anxml:text node) or as an XML element with

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • onCreateOptionsMenu (Activity)
  • getResourceAsStream (ClassLoader)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Path (java.nio.file)
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JComboBox (javax.swing)
  • Top Vim 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