Package net.asfun.jangod.util

Examples of net.asfun.jangod.util.ListOrderedMap


    }
    if ( runtime.get(CHILD_FLAG, 1) != null &&
        runtime.get(INSERT_FLAG, 1) == null) {
      StringBuilder sb = new StringBuilder((String)fetchRuntimeScope(SEMI_RENDER, 1));
      //replace the block identify with block content
      ListOrderedMap blockList = (ListOrderedMap) fetchRuntimeScope(BLOCK_LIST, 1);
      Iterator<Item> mi = blockList.iterator();
      int index;
      String replace;
      Item item;
      while( mi.hasNext() ) {
        item = mi.next();
View Full Code Here


          interpreter.getWorkspace(), interpreter.getConfiguration().getWorkspace());
      Node node = interpreter.getContext().getApplication().getParseResult(
          fullName, interpreter.getConfiguration().getEncoding() );
     
     
      ListOrderedMap blockList = new ListOrderedMap();
      interpreter.assignRuntimeScope(JangodInterpreter.BLOCK_LIST, blockList, 1);
      JangodInterpreter parent = interpreter.clone();
      interpreter.assignRuntimeScope(JangodInterpreter.CHILD_FLAG, true, 1);
      parent.assignRuntimeScope(JangodInterpreter.PARENT_FLAG, true, 1);
      String semi = parent.render(node);
View Full Code Here

      blockNames.add(blockName);
      interpreter.assignRuntimeScope(BLOCKNAMES, blockNames, 1);
    }
    Object isChild = interpreter.fetchRuntimeScope(JangodInterpreter.CHILD_FLAG, 1);
    if ( isChild != null ) {
      ListOrderedMap blockList = (ListOrderedMap) interpreter.fetchRuntimeScope(JangodInterpreter.BLOCK_LIST, 1);
      //check block was defined in parent
      if ( ! blockList.containsKey(blockName) ) {
        throw new InterpretException("Dosen't define block in extends parent with name >>> " + blockName);
      }
      //cover parent block content with child's.
      blockList.put(blockName, getBlockContent(carries, interpreter));
      return "";
    }
    Object isParent = interpreter.fetchRuntimeScope(JangodInterpreter.PARENT_FLAG, 1);
    if ( isParent != null) {
      //save block content to engine, and return identify
      ListOrderedMap blockList = (ListOrderedMap) interpreter.fetchRuntimeScope(JangodInterpreter.BLOCK_LIST, 1);
      blockList.put(blockName, getBlockContent(carries, interpreter));
      return JangodInterpreter.SEMI_BLOCK + blockName;
    }
    return getBlockContent(carries, interpreter);
  }
View Full Code Here

TOP

Related Classes of net.asfun.jangod.util.ListOrderedMap

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.