Package gluebooster.basic.collections

Examples of gluebooster.basic.collections.BoostedNode


    return slipcase; //BoostedNode slipcase =
  }
 
  @SuppressWarnings("unchecked")
  public static BoostedNode newZoomInBook (BoostedNode parent, Object documentationType, HasDocumentation content, DocumentationContext context, ChangeListener listener, boolean close) throws Exception{
    BoostedNode book = BoostedNodeUtils.createZoomInNode(parent, listener, getDocumentationResourcesTranslation(context).getString(documentationType.toString()), null);
    book.getAttributes().setType(GeneralConstants.BOOK);
    //book.getAttributes().setName(getDocumentationResourcesTranslation(context).getString(documentationType.toString()));
    //todo create heading, title, etc.
   
    if (DocumentationResourecesId.DOCUMENTATION_DEVELOPER.equals(documentationType)){
      BookUtils.createDiv(book, "The application may be created using the following steps.");
    }
    
    content.fillDocumentation(documentationType, book, context);
    //todo create index etc
    if (close)
      book.close();//the book is complete
   
    return book;
    
  }
View Full Code Here


            throw new IllegalStateException(
                "No filename in documentation context for key "
                    + DocumentationContext.DOCUMENTATION_TARGET_PARAMETER);
        } else if (attributes instanceof ObjectAttributes) {
          BoostedNode documentationNode = (BoostedNode) event
              .getSource();

          ObjectAttributes objectAttributes = (ObjectAttributes) attributes;
          Object command = objectAttributes.getName();
View Full Code Here

      //write the list of books
      Document doc = DomUtils.createDefaultDocumentBuilder().newDocument();
      Element body = createHtml(doc, documentationNode.getAttributes().getName(), HTML.Tag.BODY);
      Element list = DomUtils.appendElement(doc, body, HTML.Tag.UL);
      for (BoostedNode zoomInFocusPoint: documentationNode.getAllZoomInFocus()){
        BoostedNode zoomInNode = documentationNode.getZoomIn(zoomInFocusPoint, null);
        Object subtype = zoomInNode.getAttributes().getType();
       
        if (GeneralConstants.BOOK.equals(subtype)){
          Element li = DomUtils.appendElement(doc, list, HTML.Tag.LI);
          File file = getDocumentationContext(zoomInNode).getFromAttributesMap(File.class);
          DomUtils.appendElement(doc, li, HTML.Tag.A, CollectionFactory.getDefault().createMap( "href",file.getName() + "/index.html", "target", "content"),zoomInNode.getAttributes().getName());
        }
      }
      OutputStream out = getOutputStream(documentationContext, documentationNode, "booklist.html");
      DomUtils.write(doc, out);
      out.close();
View Full Code Here

      /*Element chapter = */DomUtils.appendElement(doc, parentElement, tag, null, chapterNode.getAttributes().getName());
    }
   
    int chapterCount = 0;
    for (BoostedNode zoomInFocusPoint: chapterNode.getAllZoomInFocus()){
      BoostedNode zoomInNode = chapterNode.getZoomIn(zoomInFocusPoint, null);
      Object type = zoomInNode.getAttributes().getType();
     
      if (DocumentationResourecesId.CHAPTER.equals(type)){
        BookContext newBookContext = (BookContext) bookContext.clone();
        newBookContext.setChapterBreadcrumb(Arrays.copyOf(newBookContext.getChapterBreadcrumb(), newBookContext.getChapterBreadcrumb().length + 1) );
        newBookContext.getChapterBreadcrumb()[bookContext.getChapterBreadcrumb().length] = chapterCount++;
        fillBookChapter(zoomInNode, newBookContext, doc, parentElement, true);
      }else if (HTML.Tag.DIV.equals(type)){
         Element div = DomUtils.appendElement(doc, parentElement, HTML.Tag.DIV);
         fillBookChapter(zoomInNode, bookContext, doc, div, false);
      }else if (GeneralConstants.TEXT.equals(type)){
        DomUtils.appendText(doc, parentElement, zoomInNode.getAttributes().getValue());
      }else if (GeneralConstants.RAW.equals(type)){
        DomUtils.appendRaw(doc, parentElement, zoomInNode.getAttributes().getValue());
      }else {
        warningHandler.handleThrowable(new UnsupportedDataTypeException("type " + type ));
      }
    }
     
View Full Code Here

      File file = docContext.getFromAttributesMap(File.class);

      if (file == null) {

        BoostedNode parent = documentationNode.getZoomOut(null)
            .getLeft();
        if (parent == null) {
          String filename = (String) context
              .getFromAttributesMap(DocumentationContext.DOCUMENTATION_TARGET_PARAMETER);
          if (filename == null)
View Full Code Here

public class BookUtils {
 
  @SuppressWarnings("unchecked")
  public static BoostedNode createSlipcase(BoostedNode parent, ChangeListener listener, Object name){
    BoostedNode slipcase = BoostedNodeUtils.createZoomInNode(parent, listener, name, null);
   
    slipcase.getAttributes().setType(GeneralConstants.SLIPCASE);
    //slipcase.getAttributes().setName(name);
   
    return slipcase;
  }
View Full Code Here

    return slipcase;
  }

  @SuppressWarnings("unchecked")
  public static BoostedNode createBook(BoostedNode parent, ChangeListener listener, Object name){
    BoostedNode slipcase = BoostedNodeUtils.createZoomInNode(parent, listener, name, null);
   
    slipcase.getAttributes().setType(GeneralConstants.BOOK);
    //slipcase.getAttributes().setName(name);
   
    return slipcase;
 
View Full Code Here

  @SuppressWarnings("unchecked")
  public static BoostedNode createChapter(BoostedNode parent, Object name, BoostedNode addBeforeThisPoint){
    Check.notNull(parent, "parent");
    Check.notNull(name, "name");

    BoostedNode chapter = BoostedNodeUtils.createZoomInNodeUseParentListener(parent, name, addBeforeThisPoint);
   
    chapter.getAttributes().setType(DocumentationResourecesId.CHAPTER);
    //chapter.getAttributes().setName(name);
   
    return chapter;
  }
View Full Code Here

    return chapter;
  }
  
  @SuppressWarnings("unchecked")
  public static BoostedNode createText(BoostedNode parent, String text){
    BoostedNode textNode = BoostedNodeUtils.createZoomInNodeUseParentListener(parent, null, null);
   
    textNode.getAttributes().setType(GeneralConstants.TEXT);
    textNode.getAttributes().setValue(text);
   
    return textNode;
  }
View Full Code Here

    return textNode;
  }

  @SuppressWarnings("unchecked")
  public static BoostedNode createRaw(BoostedNode parent, String rawText){
    BoostedNode node = BoostedNodeUtils.createZoomInNodeUseParentListener(parent, null, null);
   
    node.getAttributes().setType(GeneralConstants.RAW);
    node.getAttributes().setValue(rawText);
   
    return node;
  }
View Full Code Here

TOP

Related Classes of gluebooster.basic.collections.BoostedNode

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.