Codota Logo
XDOM.clone
Code IndexAdd Codota to your IDE (free)

How to use
clone
method
in
org.xwiki.rendering.block.XDOM

Best Java code snippets using org.xwiki.rendering.block.XDOM.clone (Showing top 5 results out of 315)

  • Common ways to obtain XDOM
private void myMethod () {
XDOM x =
  • Codota IconParser parser;String s;parser.parse(new StringReader(s))
  • Codota IconXDOMGeneratorListener xDOMGeneratorListener;xDOMGeneratorListener.getXDOM()
  • Smart code suggestions by Codota
}
origin: com.xpn.xwiki.platform/xwiki-core

/**
 * @return the XDOM corresponding to the document's string content.
 */
public XDOM getXDOM()
{
  if (this.xdom == null) {
    try {
      this.xdom = parseContent(getContent());
    } catch (XWikiException e) {
      LOG.error("Failed to parse document content to XDOM", e);
    }
  }
  return this.xdom.clone();
}
origin: org.xwiki.platform/xwiki-platform-component-wiki

XDOM transformedXDOM = xdom.clone();
origin: org.xwiki.platform/xwiki-platform-rendering-wikimacro-store

/**
 * Clone and filter wiki macro content depending of the context.
 * 
 * @param context the macro execution context
 * @return the cleaned wiki macro content
 */
private XDOM prepareWikiMacroContent()
{
  XDOM xdom = this.wikimacro.getContent().clone();
  // Macro code segment is always parsed into a separate xdom document. Now if this code segment starts with
  // another macro block, it will always be interpreted as a block macro regardless of the current wiki macro's
  // context (because as far as the nested macro is concerned, it starts on a new line). This will introduce
  // unnecessary paragraph elements when the wiki macro is used inline, so we need to force such opening macro
  // blocks to behave as inline macros if the wiki macro is used inline.
  if (this.inline) {
    List<Block> children = xdom.getChildren();
    if (!children.isEmpty() && children.get(0) instanceof MacroBlock) {
      MacroBlock old = (MacroBlock) children.get(0);
      MacroBlock replacement = new MacroBlock(old.getId(), old.getParameters(), old.getContent(), true);
      xdom.replaceChild(replacement, old);
    }
  }
  return xdom;
}
origin: org.xwiki.platform/xwiki-platform-office-viewer

@Override
public XDOM createView(ResourceReference reference, Map<String, ?> parameters) throws Exception
{
  OfficeDocumentView view;
  if (reference.getType().equals(ResourceType.ATTACHMENT) || reference.getType().equals(ResourceType.UNKNOWN)) {
    AttachmentReference attachmentReference = this.attachmentResolver.resolve(reference.getReference());
    view = getView(reference, attachmentReference, parameters);
  } else {
    view = getView(reference, parameters);
  }
  // We have to clone the cached XDOM to protect it from the rendering transformations. For instance, macro
  // transformations must be executed even when the XDOM is taken from the cache.
  return view.getXDOM().clone();
}
origin: org.xwiki.platform/xwiki-platform-uiextension-api

XDOM transformedBlock = this.xdom.clone();
org.xwiki.rendering.blockXDOMclone

Popular methods of XDOM

  • getChildren
  • <init>
  • getMetaData
  • getBlocks
  • getChildrenByType
  • setIdGenerator
  • traverse
  • addChild
  • getFirstBlock
  • getParameters
  • indexOf
  • replaceChild
  • indexOf,
  • replaceChild,
  • setChildren

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JFrame (javax.swing)
  • JTable (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registery of org.quartz
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now