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

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

Best Java code snippets using org.apache.jackrabbit.commons.xml.DocumentViewExporter.exportProperties (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.xmlDocumentViewExporterexportProperties

Popular methods of DocumentViewExporter

  • <init>
    Creates a document view exporter.
  • addAttribute
  • exportNodes
  • characters
  • endElement
  • 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

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • IsNull (org.hamcrest.core)
    Is the value null?
  • 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