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

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

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

origin: info.magnolia/magnolia-core

@Override
protected void exportProperty(String uri, String local, int type, Value[] values) {
  try {
    final StringBuilder attribute = new StringBuilder("");
    for (Value value : values) {
      attribute.append(getPropertyTypePrefix(value));
      attribute.append(serializeValue(value, type));
      attribute.append(",");
    }
    final String name = StringUtils.isEmpty(uri) ? ISO9075.encode(serializeKey(uri, local)) : local;
    final String attributeString = "[" + (values.length == 0 ? "" : attribute.substring(0, attribute.length() - 1)) + "]";
    super.addAttribute(uri, name, attributeString);
  } catch (RepositoryException e) {
    throw new RuntimeException(e);
  }
}
origin: org.apache.jackrabbit/jackrabbit-jcr-commons

/**
 * Maps the given single-valued property to an XML attribute.
 */
protected void exportProperty(String uri, String local, Value value)
    throws RepositoryException {
  // TODO: Serialized names and paths should use XML namespace mappings
  String attribute = ValueHelper.serialize(value, false);
  addAttribute(uri, ISO9075.encode(local), attribute);
}
origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak

/**
 * Maps the given single-valued property to an XML attribute.
 */
protected void exportProperty(String uri, String local, Value value)
    throws RepositoryException {
  // TODO: Serialized names and paths should use XML namespace mappings
  String attribute = ValueHelper.serialize(value, false);
  addAttribute(uri, ISO9075.encode(local), attribute);
}
origin: apache/jackrabbit

/**
 * Maps the given single-valued property to an XML attribute.
 */
protected void exportProperty(String uri, String local, Value value)
    throws RepositoryException {
  // TODO: Serialized names and paths should use XML namespace mappings
  String attribute = ValueHelper.serialize(value, false);
  addAttribute(uri, ISO9075.encode(local), attribute);
}
origin: info.magnolia/magnolia-core

@Override
protected void exportProperty(String uri, String local, Value value) throws RepositoryException {
  //mgnl:contentNode is the default nodeType, no need to export it, this saves a lot of lines e.g. in the configuration workspace export
  if (JcrConstants.JCR_PRIMARYTYPE.equals(getXMLName(uri, local)) && NodeTypes.ContentNode.NAME.equals(value.getString())) {
    return;
  }
  final String name = ISO9075.encode(serializeKey(uri, local));
  final String attribute = serializeValue(value, value.getType());
  final String propertyType = getPropertyTypePrefix(value);
  super.addAttribute(uri, name, propertyType + attribute);
}
org.apache.jackrabbit.commons.xmlDocumentViewExporteraddAttribute

Popular methods of DocumentViewExporter

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

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Runner (org.openjdk.jmh.runner)
  • Top Sublime Text 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