Package org.structr.web.entity.dom

Examples of org.structr.web.entity.dom.ShadowDocument


   */
  protected ShadowDocument getOrCreateHiddenDocument() throws FrameworkException {

    final App app = StructrApp.getInstance();

    ShadowDocument doc = app.nodeQuery(ShadowDocument.class).getFirst();
    if (doc == null) {

      final PropertyMap properties = new PropertyMap();
      properties.put(AbstractNode.type, ShadowDocument.class.getSimpleName());
      properties.put(AbstractNode.name, "__ShadowDocument__");
View Full Code Here


       
          moveChildNodes(node, clonedNode);
       
        }

        ShadowDocument hiddenDoc = getOrCreateHiddenDocument();
        clonedNode.setProperty(DOMNode.ownerDocument, hiddenDoc);

        // Change page (owner document) of all children recursively
        for (DOMNode child : DOMNode.getAllChildNodes(clonedNode)) {
          child.setProperty((DOMNode.ownerDocument), hiddenDoc);
View Full Code Here

        logger.log(Level.WARNING, "No shadow document found");
        return;
       
      }
     
      ShadowDocument doc = (ShadowDocument) result.get(0);
     
      resultList.addAll(doc.getProperty(Page.elements));
     
      // Filter list and return only top level nodes
      for (GraphObject obj : resultList) {

        if (obj instanceof DOMNode) {

          DOMNode node = (DOMNode) obj;

          if (!doc.equals(node) && !node.hasIncomingRelationships(DOMChildren.class)) {
           
            filteredResults.add(node);

          }
View Full Code Here

TOP

Related Classes of org.structr.web.entity.dom.ShadowDocument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.